Skip to content

Support for rgba within cm-colors #19

@kylowren85

Description

@kylowren85

Problem

Need rgba(r, g, b, a) support in cm-colors, for tune_colors function.

Context and Considerations on what needs to be done

  1. Either conversion of rgba() into rgb() as an aftermath calculation that considers the background color and the text color, i.e., background color affects the text color if text has alpha channel (rgba), so cm-colors should have a function that finds the resultant color of the text with rgba that is affected by the specific background color (of course, a text with transparancy and a bg color will have a color thats inside the color spectrum).
  2. Or have a completely new algorithm that takes in alpha channel into consideration while tuning colors, so cm-colors uses one method for non alpha colors, while uses a different method for colors with opacity.
  3. Or any other method you may feel works best while adding rgba support.

Solving this issue helps what?

It helps in reworking CLI tool of cm-colors, where css parsing currently ignores rgba colors. The CLI needs cm-colors to have a way to tune rgba colors so that the parser can tune them also and output css files.

What does the CLI do, why should I care about that with this issue

The CLI parses entire css file, which may contain rgba values, and output an entirely new css file with tuned colors wherever possible.
At present theres no support for rgba from the CLI side, the CLI simply ignores it and writes the output file without tuning whatever color was defined with rgba

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions