![]() Only relevant when using a format with an alpha channel ( rgba and hsla). ![]() Possible values are rgb, rgba, hsl, hsla, hsv and hex (default).Īlpha – A decimal between 0 and 1. including hexadecimal color code, RGB color values, HSL color values, and one-click copy is also supported. Seed - An integer or a string which when passed will cause randomColour to return the same colour each time.įormat – A string which specifies the format of the generated colour. Random color generator can generate color randomly with one click, including colors brightness, deepening or lightening color display. ![]() Defaults to nil.Ĭount – An integer which specifies the number of colours to generate. You can specify a string containing bright, light or dark. Luminosity – Controls the luminosity of the generated colour. If you pass a hexidecimal colour string such as #00FFFF, randomColour will extract its hue value and use that to generate colours. You can pass a string representing a colour name: red, orange, yellow, green, blue, purple, pink and monochrome are currently supported. Hue – Controls the hue of the generated colour. The options object accepts the following properties: You can pass an options object to influence the type of colour it produces. generate ( seed : 11, luminosity : "light", ) # "#707EE5" # Returns a list of predefined hues RandomColour. generate ( luminosity : "light", format : "hsla" ) # Returns the same colour based on a given seed RandomColour. generate ( luminosity : "dark", format : "rgba", alpha : 0.5 ) # Returns a light HSL colour with random alpha RandomColour. generate ( luminosity : "dark", format : "rgba" ) # Returns a dark RGB colour with specified alpha RandomColour. generate ( luminosity : "bright", format : "rgb" ) # Returns a dark RGB colour with random alpha RandomColour. generate ( luminosity : "light", hue : "blue" ) # Returns a bright colour in RGB RandomColour. generate ( count : 10, hue : "green" ) # Returns a hex code for a light blue RandomColour. generate ( ) # Returns an array of ten green colours RandomColour. # Returns a hex code for an attractive colour RandomColour. It is an Elixir port of David Merfield's randomColor RandomColour is a tool for generating attractive random colours.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |