mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-06 10:45:49 +08:00
Merge code
This commit is contained in:
@@ -280,6 +280,13 @@ val Int.isWhite
|
|||||||
(0.2126 * r + 0.7152 * g + 0.0722 * b) >= 128
|
(0.2126 * r + 0.7152 * g + 0.0722 * b) >= 128
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调整颜色透明度
|
||||||
|
* @param value 透明度
|
||||||
|
* @return [Int] 调整后的颜色
|
||||||
|
*/
|
||||||
|
fun Int.colorAlphaOf(value: Float) = safeOfNan { (255.coerceAtMost(0.coerceAtLeast((value * 255).toInt())) shl 24) + (0x00ffffff and this) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base64 加密
|
* Base64 加密
|
||||||
* @return [String]
|
* @return [String]
|
||||||
|
Reference in New Issue
Block a user