色调偏移字符串的颜色 [英] Hue shift string of colors

查看:121
本文介绍了色调偏移字符串的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些十六进制颜色(作为主题的一部分)说绿色的阴影。



我想设置一个颜色,所有的颜色应该自动变成等同于那个阴影。



UPDATE



我相信我必须将RGB转换为HSL,在-180到180之间)。

解决方案

您需要从RGB转换为HSV, (hue)值来更改基本颜色。


I have a number of hex colors (as part of a theme) in say a shade of green. I want to find equivalent colors in another shade say blue.

I would like to set a color and all the colors should automatically become equivalent to that shade.

UPDATE

I believe I have to convert the RGB to HSL and then shift it accordingly (between -180 to 180).

解决方案

You need to convert from RGB to HSV and for the resulting HSV values just alter the H (hue) value to change the base color.

这篇关于色调偏移字符串的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆