How to use the @swim/color.Color.rgb function in @swim/color

To help you get started, we’ve selected a few @swim/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 swimos / traffic / ui / main / map / IntersectionPopoverViewController.ts View on Github external
const chart = new ChartView()
        .bottomAxis("time")
        .leftAxis("linear")
        .bottomGesture(true)
        .leftDomainPadding([0.1, 0.1])
        .topGutter(0)
        .rightGutter(0)
        .bottomGutter(20)
        .leftGutter(-1)
        .domainColor("#4a4a4a")
        .tickMarkColor("#4a4a4a")
        .font("12px sans-serif")
        .textColor("#4a4a4a");
      canvas.append(chart);

      const futureColor = Color.rgb('#6c6c6c').alpha(0.2);
      const plot0 = new AreaGraphView()
        .fill(futureColor);
      chart.addPlot(plot0);

      const plot1 = new LineGraphView()
        .stroke(futureColor)
        .strokeWidth(1);
      chart.addPlot(plot1);

      const plot2 = new LineGraphView()
        .stroke("#00a6ed")
        .strokeWidth(1);
      chart.addPlot(plot2);

      this._chartChildView[key] = {
        chartVew: chart,

@swim/color

RGB and HSL color types with color-space-aware operators, conversions, and parsers

Apache-2.0
Latest version published 5 years ago

Package Health Score

61 / 100
Full package analysis

Similar packages