Transforms rgb to hcl, sets non-missing arguments and then backtransforms to rgb.

col2hcl(colour, h, c, l, alpha = 1)

Arguments

colour

character vector of colours to be modified

h

new hue

c

new chroma

l

new luminance

alpha

alpha value. Defaults to 1.

Examples

col2hcl(colors())
#> [1] "#FFFFFFFF" "#F0F8FFFF" "#FAEBD7FF" "#FFEFDBFF" "#EEDFCCFF" "#CDC0B0FF" #> [7] "#8B8378FF" "#7DFFD4FF" "#7DFFD4FF" "#74EEC6FF" "#65CDAAFF" "#448B74FF" #> [13] "#F0FFFFFF" "#F0FFFFFF" "#E0EEEEFF" "#C1CDCDFF" "#838B8BFF" "#F5F5DCFF" #> [19] "#FFE4C4FF" "#FFE4C4FF" "#EED5B7FF" "#CDB79EFF" "#8B7D6BFF" "#000000FF" #> [25] "#FFEBCDFF" "#0002FFFF" "#0002FFFF" "#0001EEFF" "#0001CDFF" "#00008BFF" #> [31] "#8A2BE2FF" "#A62A2AFF" "#FF4040FF" "#EF3B3BFF" "#CE3333FF" "#8C2323FF" #> [37] "#DEB887FF" "#FFD39BFF" "#EEC591FF" "#CDAA7DFF" "#8B7355FF" "#5E9EA0FF" #> [43] "#97F5FFFF" "#8DE5EEFF" "#79C5CDFF" "#52868BFF" "#7EFF06FF" "#7EFF06FF" #> [49] "#75EE06FF" "#65CD04FF" "#448B02FF" "#D3691FFF" "#FF7F25FF" "#EF7622FF" #> [55] "#CE661EFF" "#8B4514FF" "#FF7F50FF" "#FF7256FF" "#EF6A50FF" "#CE5B45FF" #> [61] "#8B3E2FFF" "#6395EDFF" "#FFF8DCFF" "#FFF8DCFF" "#EEE8CDFF" "#CDC8B1FF" #> [67] "#8B8878FF" "#00FFFFFF" "#00FFFFFF" "#00EEEEFF" "#00CDCDFF" "#008B8BFF" #> [73] "#00008BFF" "#008B8BFF" "#B8860DFF" "#FFB912FF" "#EFAD11FF" "#CE950FFF" #> [79] "#8B6509FF" "#A9A9A9FF" "#006401FF" "#A9A9A9FF" "#BDB76BFF" "#8B018BFF" #> [85] "#556B2FFF" "#CAFF71FF" "#BCEE69FF" "#A2CD5AFF" "#6E8B3DFF" "#FF8C04FF" #> [91] "#FF7F03FF" "#EF7603FF" "#CE6602FF" "#8B4501FF" "#9932CCFF" "#BF3EFFFF" #> [97] "#B23AEEFF" "#9A32CDFF" "#68228BFF" "#8C0001FF" "#EA967AFF" "#8FBC8FFF" #> [103] "#C1FFC1FF" "#B4EEB4FF" "#9BCD9BFF" "#698B69FF" "#483D8BFF" "#2F4F4FFF" #> [109] "#96FFFFFF" "#8CEEEEFF" "#78CDCDFF" "#518B8BFF" "#2F4F4FFF" "#00CED1FF" #> [115] "#9402D3FF" "#FF1593FF" "#FF1593FF" "#EF1389FF" "#CE1176FF" "#8C0B50FF" #> [121] "#00BFFFFF" "#00BFFFFF" "#00B2EEFF" "#009ACDFF" "#00688BFF" "#696969FF" #> [127] "#696969FF" "#1890FFFF" "#1890FFFF" "#1686EEFF" "#1374CDFF" "#0D4E8BFF" #> [133] "#B32222FF" "#FF3031FF" "#EF2C2CFF" "#CE2626FF" "#8C1A1AFF" "#FFFAF0FF" #> [139] "#208B23FF" "#DCDCDCFF" "#F8F8FFFF" "#FFD706FF" "#FFD706FF" "#EEC905FF" #> [145] "#CDAD04FF" "#8B7502FF" "#DBA521FF" "#FFC127FF" "#EFB424FF" "#CD9B1EFF" #> [151] "#8B6915FF" "#BEBEBEFF" "#000000FF" "#030303FF" "#050505FF" "#080808FF" #> [157] "#0A0A0AFF" "#0D0D0DFF" "#0F0F0FFF" "#121212FF" "#141414FF" "#171717FF" #> [163] "#1A1A1AFF" "#1C1C1CFF" "#1F1F1FFF" "#212121FF" "#242424FF" "#262626FF" #> [169] "#292929FF" "#2B2B2BFF" "#2E2E2EFF" "#303030FF" "#333333FF" "#363636FF" #> [175] "#383838FF" "#3B3B3BFF" "#3D3D3DFF" "#404040FF" "#424242FF" "#454545FF" #> [181] "#474747FF" "#4A4A4AFF" "#4D4D4DFF" "#4F4F4FFF" "#525252FF" "#545454FF" #> [187] "#575757FF" "#595959FF" "#5C5C5CFF" "#5E5E5EFF" "#616161FF" "#636363FF" #> [193] "#666666FF" "#696969FF" "#6B6B6BFF" "#6E6E6EFF" "#707070FF" "#737373FF" #> [199] "#757575FF" "#787878FF" "#7A7A7AFF" "#7D7D7DFF" "#7F7F7FFF" "#828282FF" #> [205] "#858585FF" "#878787FF" "#8A8A8AFF" "#8C8C8CFF" "#8F8F8FFF" "#919191FF" #> [211] "#949494FF" "#969696FF" "#999999FF" "#9C9C9CFF" "#9E9E9EFF" "#A1A1A1FF" #> [217] "#A3A3A3FF" "#A6A6A6FF" "#A8A8A8FF" "#ABABABFF" "#ADADADFF" "#B0B0B0FF" #> [223] "#B3B3B3FF" "#B5B5B5FF" "#B8B8B8FF" "#BABABAFF" "#BDBDBDFF" "#BFBFBFFF" #> [229] "#C2C2C2FF" "#C4C4C4FF" "#C7C7C7FF" "#C9C9C9FF" "#CCCCCCFF" "#CFCFCFFF" #> [235] "#D1D1D1FF" "#D4D4D4FF" "#D6D6D6FF" "#D9D9D9FF" "#DBDBDBFF" "#DEDEDEFF" #> [241] "#E0E0E0FF" "#E3E3E3FF" "#E5E5E5FF" "#E8E8E8FF" "#EBEBEBFF" "#EDEDEDFF" #> [247] "#F0F0F0FF" "#F2F2F2FF" "#F5F5F5FF" "#F7F7F7FF" "#FAFAFAFF" "#FCFCFCFF" #> [253] "#FFFFFFFF" "#00FF06FF" "#00FF06FF" "#00EE05FF" "#00CD04FF" "#008B02FF" #> [259] "#ACFF31FF" "#BEBEBEFF" "#000000FF" "#030303FF" "#050505FF" "#080808FF" #> [265] "#0A0A0AFF" "#0D0D0DFF" "#0F0F0FFF" "#121212FF" "#141414FF" "#171717FF" #> [271] "#1A1A1AFF" "#1C1C1CFF" "#1F1F1FFF" "#212121FF" "#242424FF" "#262626FF" #> [277] "#292929FF" "#2B2B2BFF" "#2E2E2EFF" "#303030FF" "#333333FF" "#363636FF" #> [283] "#383838FF" "#3B3B3BFF" "#3D3D3DFF" "#404040FF" "#424242FF" "#454545FF" #> [289] "#474747FF" "#4A4A4AFF" "#4D4D4DFF" "#4F4F4FFF" "#525252FF" "#545454FF" #> [295] "#575757FF" "#595959FF" "#5C5C5CFF" "#5E5E5EFF" "#616161FF" "#636363FF" #> [301] "#666666FF" "#696969FF" "#6B6B6BFF" "#6E6E6EFF" "#707070FF" "#737373FF" #> [307] "#757575FF" "#787878FF" "#7A7A7AFF" "#7D7D7DFF" "#7F7F7FFF" "#828282FF" #> [313] "#858585FF" "#878787FF" "#8A8A8AFF" "#8C8C8CFF" "#8F8F8FFF" "#919191FF" #> [319] "#949494FF" "#969696FF" "#999999FF" "#9C9C9CFF" "#9E9E9EFF" "#A1A1A1FF" #> [325] "#A3A3A3FF" "#A6A6A6FF" "#A8A8A8FF" "#ABABABFF" "#ADADADFF" "#B0B0B0FF" #> [331] "#B3B3B3FF" "#B5B5B5FF" "#B8B8B8FF" "#BABABAFF" "#BDBDBDFF" "#BFBFBFFF" #> [337] "#C2C2C2FF" "#C4C4C4FF" "#C7C7C7FF" "#C9C9C9FF" "#CCCCCCFF" "#CFCFCFFF" #> [343] "#D1D1D1FF" "#D4D4D4FF" "#D6D6D6FF" "#D9D9D9FF" "#DBDBDBFF" "#DEDEDEFF" #> [349] "#E0E0E0FF" "#E3E3E3FF" "#E5E5E5FF" "#E8E8E8FF" "#EBEBEBFF" "#EDEDEDFF" #> [355] "#F0F0F0FF" "#F2F2F2FF" "#F5F5F5FF" "#F7F7F7FF" "#FAFAFAFF" "#FCFCFCFF" #> [361] "#FFFFFFFF" "#F0FFF0FF" "#F0FFF0FF" "#E0EEE0FF" "#C1CDC1FF" "#838B83FF" #> [367] "#FF69B4FF" "#FF6EB4FF" "#EF6AA7FF" "#CE6090FF" "#8B3A62FF" "#CE5C5CFF" #> [373] "#FF6A6AFF" "#EF6363FF" "#CE5555FF" "#8B3A3AFF" "#FFFFF0FF" "#FFFFF0FF" #> [379] "#EEEEE0FF" "#CDCDC1FF" "#8B8B83FF" "#F0E68CFF" "#FFF68FFF" "#EEE685FF" #> [385] "#CDC673FF" "#8B864EFF" "#E6E6FAFF" "#FFF0F5FF" "#FFF0F5FF" "#EEE0E5FF" #> [391] "#CDC1C5FF" "#8B8386FF" "#7BFC06FF" "#FFFACDFF" "#FFFACDFF" "#EEE9BFFF" #> [397] "#CDC9A5FF" "#8B8970FF" "#ADD8E6FF" "#BEEFFFFF" "#B1DFEEFF" "#9AC0CDFF" #> [403] "#68838BFF" "#F18080FF" "#E0FFFFFF" "#E0FFFFFF" "#D1EEEEFF" "#B4CDCDFF" #> [409] "#7A8B8BFF" "#EEDD82FF" "#FFEC8BFF" "#EEDC82FF" "#CDBE70FF" "#8B814CFF" #> [415] "#FAFAD2FF" "#D3D3D3FF" "#8FEE90FF" "#D3D3D3FF" "#FFB6C1FF" "#FFAEB9FF" #> [421] "#EFA2ADFF" "#CD8C95FF" "#8B5F65FF" "#FFA07AFF" "#FFA07AFF" "#EF9572FF" #> [427] "#CE8162FF" "#8B5742FF" "#1BB2AAFF" "#86CEFAFF" "#AFE2FFFF" "#A3D3EEFF" #> [433] "#8CB6CDFF" "#607B8BFF" "#8470FFFF" "#778899FF" "#778899FF" "#B0C4DEFF" #> [439] "#CAE1FFFF" "#BCD2EEFF" "#A2B5CDFF" "#6E7B8BFF" "#FFFFE0FF" "#FFFFE0FF" #> [445] "#EEEED1FF" "#CDCDB4FF" "#8B8B7AFF" "#2FCD33FF" "#FAF0E6FF" "#FF03FFFF" #> [451] "#FF03FFFF" "#EF03EEFF" "#CE02CDFF" "#8B018BFF" "#B13060FF" "#FF35B3FF" #> [457] "#EF30A7FF" "#CE2990FF" "#8B1C62FF" "#65CDAAFF" "#0001CDFF" "#BA55D3FF" #> [463] "#E066FFFF" "#D15FEEFF" "#B452CDFF" "#7A378BFF" "#9370DBFF" "#AB82FFFF" #> [469] "#9F79EEFF" "#8968CDFF" "#5D478BFF" "#3AB371FF" "#7B68EEFF" "#00FA9AFF" #> [475] "#45D1CCFF" "#C81685FF" "#181970FF" "#F5FFFAFF" "#FFE4E1FF" "#FFE4E1FF" #> [481] "#EED5D2FF" "#CDB7B5FF" "#8B7D7BFF" "#FFE4B5FF" "#FFDEADFF" "#FFDEADFF" #> [487] "#EECFA1FF" "#CDB38BFF" "#8B795EFF" "#000080FF" "#000080FF" "#FDF5E6FF" #> [493] "#6B8E24FF" "#C0FF3FFF" "#B3EE3BFF" "#9ACD33FF" "#698B23FF" "#FFA504FF" #> [499] "#FFA504FF" "#EF9A04FF" "#CE8503FF" "#8B5A01FF" "#FF4502FF" "#FF4502FF" #> [505] "#EF4002FF" "#CE3701FF" "#8C2501FF" "#DB70D6FF" "#FF83FAFF" "#EF7AE9FF" #> [511] "#CD69C9FF" "#8B4789FF" "#EEE8AAFF" "#97FB98FF" "#99FF9AFF" "#8FEE90FF" #> [517] "#7BCD7CFF" "#538B54FF" "#AEEEEEFF" "#BAFFFFFF" "#ADEEEEFF" "#95CDCDFF" #> [523] "#668B8BFF" "#DC7093FF" "#FF82ABFF" "#EF799FFF" "#CE6889FF" "#8B475DFF" #> [529] "#FFEFD5FF" "#FFDAB9FF" "#FFDAB9FF" "#EECBADFF" "#CDAF95FF" "#8B7765FF" #> [535] "#CE853FFF" "#FFC0CBFF" "#FFB5C5FF" "#EEA9B8FF" "#CD919EFF" "#8B636CFF" #> [541] "#DDA0DDFF" "#FFBBFFFF" "#EEAEEEFF" "#CD96CDFF" "#8B668BFF" "#AFE0E6FF" #> [547] "#A021F0FF" "#9B31FFFF" "#912DEEFF" "#7D26CDFF" "#551A8BFF" "#FF0202FF" #> [553] "#FF0202FF" "#EF0102FF" "#CE0101FF" "#8C0001FF" "#BC8F8FFF" "#FFC1C1FF" #> [559] "#EEB4B4FF" "#CD9B9BFF" "#8B6969FF" "#4069E1FF" "#4676FFFF" "#416EEEFF" #> [565] "#395FCDFF" "#26408BFF" "#8B4514FF" "#FB8072FF" "#FF8C69FF" "#EF8262FF" #> [571] "#CE7054FF" "#8B4C39FF" "#F5A460FF" "#2C8B57FF" "#51FF9FFF" "#4BEE94FF" #> [577] "#41CD80FF" "#2C8B57FF" "#FFF5EEFF" "#FFF5EEFF" "#EEE5DEFF" "#CDC5BFFF" #> [583] "#8B8682FF" "#A1522DFF" "#FF8247FF" "#EF7942FF" "#CE6839FF" "#8B4726FF" #> [589] "#86CEEBFF" "#86CEFFFF" "#7DC0EEFF" "#6BA6CDFF" "#49708BFF" "#6A5ACDFF" #> [595] "#836FFFFF" "#7A67EEFF" "#6959CDFF" "#473C8BFF" "#708090FF" "#C6E2FFFF" #> [601] "#B9D3EEFF" "#9FB6CDFF" "#6C7B8BFF" "#708090FF" "#FFFAFAFF" "#FFFAFAFF" #> [607] "#EEE9E9FF" "#CDC9C9FF" "#8B8989FF" "#00FF7FFF" "#00FF7FFF" "#00EE76FF" #> [613] "#00CD66FF" "#008B45FF" "#4582B4FF" "#61B8FFFF" "#5AACEEFF" "#4E94CDFF" #> [619] "#35648BFF" "#D2B48CFF" "#FFA550FF" "#EF9A4AFF" "#CE853FFF" "#8B5A2BFF" #> [625] "#D8BFD8FF" "#FFE1FFFF" "#EED2EEFF" "#CDB5CDFF" "#8B7B8BFF" "#FF6347FF" #> [631] "#FF6347FF" "#EF5C42FF" "#CE4F39FF" "#8B3626FF" "#3CE0D0FF" "#00F5FFFF" #> [637] "#00E5EEFF" "#00C5CDFF" "#00868BFF" "#EF82EEFF" "#D12190FF" "#FF3E96FF" #> [643] "#EF3A8CFF" "#CE3278FF" "#8B2252FF" "#F5DEB3FF" "#FFE7BAFF" "#EED8AEFF" #> [649] "#CDBA96FF" "#8B7E66FF" "#F5F5F5FF" "#FFFF08FF" "#FFFF08FF" "#EEEE07FF" #> [655] "#CDCD05FF" "#8B8B02FF" "#9ACD33FF"