mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-02-03 20:27:40 +01:00
カラーピッカーの文字列解釈を変更
This commit is contained in:
parent
422e21c28a
commit
43c1046f02
@ -17,7 +17,7 @@ class TestColorString {
|
||||
}
|
||||
a("", Color.BLACK)
|
||||
a("8", Color.BLACK or 0x88_88_88)
|
||||
a("56", Color.BLACK or 0x55_66_00)
|
||||
a("56", Color.BLACK or 0x55_66_80)
|
||||
a("123", Color.BLACK or 0x11_22_33)
|
||||
a("1234", 0x11_22_33_44)
|
||||
a("12345", Color.BLACK or 0x12_34_55)
|
||||
|
@ -15,7 +15,7 @@ fun parseColorString(src: String): Int {
|
||||
return when (src.length - start) {
|
||||
0 -> Color.BLACK
|
||||
1 -> Color.argb(255, c1(0), c1(0), c1(0))
|
||||
2 -> Color.argb(255, c1(0), c1(1), 0)
|
||||
2 -> Color.argb(255, c1(0), c1(1), 0x80)
|
||||
3 -> Color.argb(255, c1(0), c1(1), c1(2))
|
||||
4 -> Color.argb(c1(0), c1(1), c1(2), c1(3))
|
||||
5 -> Color.argb(255, c2(0), c2(2), c1(4))
|
||||
|
Loading…
x
Reference in New Issue
Block a user