We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
旧実装 のような定義を整備したい。
@color
Assets
定義名に"Color" を含めるとコーディング時に探しやすいかもしれない。
android.graphics.Color の定義はこんな感じ。
public class Color { @ColorInt public static final int BLACK = 0xFF000000;
@ColorInt はA + RGB を意図していて、他の規格に変換するならandroidx.core.graphics.ColorUtils のcolorToHSL() などを使う感じ。
@ColorInt
androidx.core.graphics.ColorUtils
colorToHSL()
android.R.color の定義(colors.xml) はこんな感じ。
android.R.color
<!-- The color black, equivalent to 0xff000000 --> <color name="black">#ff000000</color>
https://developer.apple.com/documentation/uikit/uicolor/standard_colors#topics
配置は置いておいて、下記のようなJSON 形式になる。
{ "colors" : [ { "color" : { "color-space" : "srgb", "components" : { "alpha" : "1.000", "blue" : "0x28", "green" : "0x5A", "red" : "0xE1" } }, "idiom" : "universal" }, { "appearances" : [ { "appearance" : "luminosity", "value" : "dark" } ], "color" : { "color-space" : "srgb", "components" : { "alpha" : "1.000", "blue" : "0x28", "green" : "0x5A", "red" : "0xE1" } }, "idiom" : "universal" } ], "info" : { "author" : "xcode", "version" : 1 } }
The text was updated successfully, but these errors were encountered:
tshion
No branches or pull requests
旧実装 のような定義を整備したい。
@color
, iOS はAssets
?)メモ
定義名に"Color" を含めるとコーディング時に探しやすいかもしれない。
Android 定数
android.graphics.Color の定義はこんな感じ。
@ColorInt
はA + RGB を意図していて、他の規格に変換するならandroidx.core.graphics.ColorUtils
のcolorToHSL()
などを使う感じ。Android リソース
android.R.color
の定義(colors.xml) はこんな感じ。iOS 定数
https://developer.apple.com/documentation/uikit/uicolor/standard_colors#topics
iOS リソース
配置は置いておいて、下記のようなJSON 形式になる。
The text was updated successfully, but these errors were encountered: