Description

This plugin has the following color functions:

  • rgb - returns the 6 characters lowercase hexadecimal of R, G, B.
    The input can be a numerical array or 3 numerical parameters.
    Each input parameter goes from [0, 255].
    example: '#' + rgb(50, 30, 10)
    example: '#' + rgb([255, 255, 0])
  • rgba - returns the 8 characters lowercase hexadecimal of R, G, B, A.
    The input can be a numerical array or 4 numerical parameters.
    R,G,B goes from [0, 255], and A goes from 0 to 1.
    example: '#' + rgb(50, 30, 10, 0.1)
    example: '#' + rgb([255, 255, 0, 0.3])
  • hsl - returns the 6 characters lowercase hexadecimal of H, S, L.
    The input can be a numerical array or 3 numerical parameters.
    Each input parameter goes from [0, 1].
    example: '#' + hsl(0.5, 0.2, 0.6)
    example: '#' + hsl([0.5, 0.2, 0.6])
  • hsla - returns the 8 characters lowercase hexadecimal of H, S, L, A.
    The input can be a numerical array or 4 numerical parameters.
    H, S, L, A goes from [0, 1].
    example: '#' + hsl(0.5, 0.2, 0.6, 0.1)
    example: '#' + hsl([0.5, 0.2, 0.6, 0.3])
  • hsl2Rgb - returns a numerical array representing [R, G, B].
    The input can be a numerical array or 3 numerical parameters.
    Each input parameter goes from [0, 1].
    example: hsl2Rgb(0.5, 0.2, 0.6)
    example: hsl2Rgb([0.5, 0.2, 0.6])
  • rgb2Hsl - returns a numerical array representing [H, S, L].
    The input can be a numerical array or 3 numerical parameters.
    Each input parameter goes from [0, 255].
    example: hsl2Rgb(50, 30, 10)
    example: hsl2Rgb([50, 30, 10])
    see: animate-colors.