flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
18
VISUALIZACION/node_modules/polished/lib/internalHelpers/_hslToHex.js.flow
generated
vendored
Executable file
18
VISUALIZACION/node_modules/polished/lib/internalHelpers/_hslToHex.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
// @flow
|
||||
import hslToRgb from './_hslToRgb'
|
||||
import reduceHexValue from './_reduceHexValue'
|
||||
import toHex from './_numberToHex'
|
||||
|
||||
function colorToHex(color: number): string {
|
||||
return toHex(Math.round(color * 255))
|
||||
}
|
||||
|
||||
function convertToHex(red: number, green: number, blue: number): string {
|
||||
return reduceHexValue(`#${colorToHex(red)}${colorToHex(green)}${colorToHex(blue)}`)
|
||||
}
|
||||
|
||||
function hslToHex(hue: number, saturation: number, lightness: number): string {
|
||||
return hslToRgb(hue, saturation, lightness, convertToHex)
|
||||
}
|
||||
|
||||
export default hslToHex
|
||||
Loading…
Add table
Add a link
Reference in a new issue