Box.Generator.Color (box v0.15.1)

View Source

Generates an RGB(A) string.

Options

  • alpha: Range of possible alpha to generate. Range is expected to be from integer value like 0..100 in order to have from 0.0 to 1.0. Fixed value can be passed as int
  • type: :hsl, :hex or :rgb

Type specific options

RGB

  • red: Range to pick for red
  • blue: Range to pick for blue
  • green: Range to pick for green

HSL

  • hue: Range to pick for hue
  • saturation: Range to pick for saturation
  • lightness: Range to pick for lightness

Summary

Functions

generate(atom, alpha, options)