How to use the color.default function in color

To help you get started, we’ve selected a few color 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 codypearce / material-bread / src / Components / Progress / ProgressBar / ProgressBar.js View on Github external
color,
      trackStyle,
      determinate,
      theme,
      testID,
    } = this.props;
    const {
      indicatorPosition,
      indicatorScaleX,
      indicatorWidth,
      trackScaleY,
      trackOpacity,
    } = this.state;

    const trackColor = color
      ? colorTool(color)
          .fade(0.4)
          .string()
      : colorTool(theme.primary.main)
          .fade(0.4)
          .string(); // .6 alpha of indicator
    const indicatorColor = color ? color : theme.primary.main;

    return (
github codypearce / material-bread / src / Components / Progress / ProgressBar / ProgressBar.js View on Github external
theme,
      testID,
    } = this.props;
    const {
      indicatorPosition,
      indicatorScaleX,
      indicatorWidth,
      trackScaleY,
      trackOpacity,
    } = this.state;

    const trackColor = color
      ? colorTool(color)
          .fade(0.4)
          .string()
      : colorTool(theme.primary.main)
          .fade(0.4)
          .string(); // .6 alpha of indicator
    const indicatorColor = color ? color : theme.primary.main;

    return (
github adotg / git-history-flow / src / edge / index.presentational.js View on Github external
                            .style('fill', d => color(d.meta().color).fade(0.9));
                        break;
github codypearce / material-bread / docs / src / components / ColorPalette / ColorBlock / ColorBlock.js View on Github external
render() {
    const { name, color, header } = this.props;
    const textColor = ColorTool(color).isLight() ? 'black' : 'white';

    return (
github adotg / git-history-flow / src / snapshot / snapshot.js View on Github external
_parse (data) {
        let parsedData,
            color;

        if (!data) {
            return null;
        }
        
        parsedData = Object.assign({}, data);
        parsedData.timestamp = utils.ISO8601toNativeDate(parsedData.timestamp);
        color = Color(parsedData.color);
        parsedData.flowColor = color.rgb().opaquer(-0.5);
       
        return parsedData;
    }
github adotg / git-history-flow / src / snapshot / index.presentational.js View on Github external
.style('fill', d => {
                                    if (d.hunk.recent) {
                                        return d.hunk.meta.color;
                                    } else {
                                        return color(d.hunk.meta.color).fade(0.9);
                                    }
                                });
                        break;