我正在尝试将此哈希颜色代码#159424 (GREEN-COLOR)转换为以编程方式进一步变暗和变亮。如何做到这一点请帮助?
使绿色变深
toDarkColor(String hashColor){
// how to convert that hash string to make green color darker?
}
使绿色变亮
toLightColor(String hashColor){
// how to convert that hash string to make green color lighter?
}
您可以使用tinycolor软件包:
TinyColor.fromString("#159424").darken(10).color