mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-25 19:13:56 +03:00
commit
d6aba950fc
|
@ -68,7 +68,7 @@ export default class LogMonitorButton extends React.Component {
|
|||
opacity: 0.2,
|
||||
cursor: 'text',
|
||||
backgroundColor: 'transparent'
|
||||
}
|
||||
};
|
||||
}
|
||||
return (
|
||||
<a onMouseEnter={::this.handleMouseEnter}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
export default function(hex, lum) {
|
||||
hex = String(hex).replace(/[^0-9a-f]/gi, "");
|
||||
export default function(hexColor, lightness) {
|
||||
let hex = String(hexColor).replace(/[^0-9a-f]/gi, '');
|
||||
if (hex.length < 6) {
|
||||
hex = hex.replace(/(.)/g, '$1$1');
|
||||
hex = hex.replace(/(.)/g, '$1$1');
|
||||
}
|
||||
lum = lum || 0;
|
||||
let lum = lightness || 0;
|
||||
|
||||
var rgb = "#",
|
||||
c;
|
||||
for (var i = 0; i < 3; ++i) {
|
||||
c = parseInt(hex.substr(i * 2, 2), 16);
|
||||
c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);
|
||||
rgb += ("00" + c).substr(c.length);
|
||||
let rgb = '#';
|
||||
let c;
|
||||
for (let i = 0; i < 3; ++i) {
|
||||
c = parseInt(hex.substr(i * 2, 2), 16);
|
||||
c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);
|
||||
rgb += ('00' + c).substr(c.length);
|
||||
}
|
||||
return rgb;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user