How to use the polished.readableColor function in polished

To help you get started, we’ve selected a few polished examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ConsenSys / rimble-app-demo / src / theme.js View on Github external
red: '#DC2C10',
  blurple: '#4E3FCE',
  consensysblue: '#3259D6',
};

// rimble palette
const colors = {
  blurple: {
    base: baseColors.blurple,
    text: readableColor(baseColors.blurple),
    light: [null, tint(0.2, baseColors.blurple)],
    dark: [null, shade(0.2, baseColors.blurple)],
  },
  blue: {
    base: baseColors.blue,
    text: readableColor(baseColors.blue),
    light: [null, tint(0.9, baseColors.blue)],
    dark: [null, shade(0.4, baseColors.blue)],
  },
  green: {
    base: baseColors.green,
    text: baseColors.white,
    light: [null, tint(0.9, baseColors.green)],
    dark: [null, shade(0.4, baseColors.green)],
  },
  yellow: {
    base: baseColors.yellow,
    text: readableColor(baseColors.yellow),
    light: [null, tint(0.9, baseColors.yellow)],
    dark: [null, shade(0.4, baseColors.yellow)],
  },
  red: {
github codice / ddf / ui / packages / catalog-ui-search / src / main / webapp / react-component / radio / radio.js View on Github external
const background = (props, alpha = 0.4) => {
  if (props.theme.backgroundDropdown !== undefined) {
    return rgba(readableColor(props.theme.backgroundDropdown), alpha)
  }
}
github codice / ddf / ui / packages / catalog-ui-search / src / main / webapp / react-component / dropdown / dropdown.js View on Github external
const background = props => {
  if (props.theme.backgroundDropdown !== undefined) {
    return rgba(readableColor(props.theme.backgroundDropdown), 0.1)
  }
}
github gamejolt / frontend-lib / components / theme / theme.model.ts View on Github external
get noticeFg_() {
		return readableColor('#' + this.notice_).substr(1);
	}
github Gympass / yoga / packages / doc / src / components / Dropdown / Dropdown.jsx View on Github external
},
  }) => `
    align-items: center;
    background-color: ${isSelected ? primaryPallete[0] : 'inherit'};
    color: ${
      isSelected ? readableColor(primaryPallete[0], darkGray, white) : 'inherit'
    };
    cursor: pointer;
    display: flex;
    height: 40px;
    padding: 0 16px;
    transition: 200ms all ease-out;

    &:hover {
      background-color: ${primaryPallete[1]};
      color: ${readableColor(primaryPallete[1], darkGray, white)};
    }
  `}
`;
github brumm / tabulous / src / components / ItemList.js View on Github external
{name}
                
                {settings.listItemHeight >= 32 &&
                  details && (
                    
                      {details}
                    
                  )}
              
            
            {hasChildren && (
              <div display="flex"></div>