Files
liberama/client/components/Reader/SettingsPage/ViewTab/helper.js

10 lines
276 B
JavaScript

const hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;
export function colorPanStyle(bgColor) {
return `width: 30px; height: 30px; border: 1px solid black; border-radius: 4px; background-color: ${bgColor}`;
}
export function isHexColor(value) {
return hex.test(value);
}