Introduce a color-function to change the alpha-value of a CSS-color

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 7u6
    • Component/s: javafx
    • None

      The FX-CSS guide lists two color-functions[1], "derive" and "ladder" and reasons that the help to "[enable] a color theme to be specified using a single base color and to have variant colors computed from that base color."

      In that vein, I would like to propose a sister-function to "derive":
      Called "transparent", it takes a color and a percentage as its argument and returns the base color with its alpha value set to the percentage.

      transparent(red, 0.5) creates semi-translucent red
      transparent(#00ff00, 0.25), creates a faint green

      A function like this would help to further reuse in fx-css and thus help to achieve a color scheme based on few base-colors.

      [1] http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#typecolor

            Assignee:
            David Grieve
            Reporter:
            Urs Reupke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: