Package-level declarations

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Return the color with 0xFF opacity. E.g., 0xabcdef will be translated to 0xFFabcdef.

Link copied to clipboard

Generates a random opaque color Note that this is mainly for testing Should you require this method often, consider rewriting the method and storing the Random instance rather than generating one each time

Functions

Link copied to clipboard
Link copied to clipboard

Parse alpha Reg green blue color String to int color

Link copied to clipboard
fun Int.blendWith(@ColorInt color: Int, @FloatRange(from = 0.0, to = 1.0) ratio: Float): Int
Link copied to clipboard
fun Int.colorAdd(value: Double): Int
fun Int.colorAdd(value: Float): Int

Adds to the color components (besides alpha), lightening it.

Link copied to clipboard
fun Int.colorAlpha(alpha: Float): Int
fun Int.colorAlpha(alpha: Int): Int

Returns the color with the new alpha value.

Link copied to clipboard
fun Int.colorMultiply(value: Float): Int

Multiplies the color components (besides alpha), darkening it.

Link copied to clipboard
Link copied to clipboard
fun Int.colorToBackground(@FloatRange(from = 0.0, to = 1.0) factor: Float = 0.1f): Int
Link copied to clipboard
fun Int.colorToForeground(@FloatRange(from = 0.0, to = 1.0) factor: Float = 0.1f): Int
Link copied to clipboard
fun convertColor(color: Int): String

Parse Reg green blue color String to int color

Link copied to clipboard
fun Int.darken(@FloatRange(from = 0.0, to = 1.0) factor: Float = 0.1f): Int
Link copied to clipboard

Method to get body text color for an app, Just pass the color and it will calculate new color according to provided color

Link copied to clipboard

Method to get Checked Color State List

Link copied to clipboard

Method to get color state list .i.e., weather it is pressed_state or focuses_state

Link copied to clipboard
fun getDarkerColor(@ColorInt color: Int, @FloatRange(from = 0.0, to = 1.0) transparency: Float): Int

Method to get Darker color from provided color

Link copied to clipboard
Link copied to clipboard

Method to get Title text color for an app, Just pass the color and it will calculate new color according to provided color

Link copied to clipboard

Convert a color to an Alpha Red Green Blue string.

Link copied to clipboard
fun Int.isColorDark(minDarkness: Float): Boolean
Link copied to clipboard
fun Int.isColorVisibleOn(@ColorInt color: Int, @IntRange(from = 0, to = 255) delta: Int = 25, @IntRange(from = 0, to = 255) minAlpha: Int = 50): Boolean
Link copied to clipboard
Link copied to clipboard

Check weather it is a valid color string code or not, like "#000000"

Link copied to clipboard
fun Int.lighten(@FloatRange(from = 0.0, to = 1.0) factor: Float = 0.1f): Int
Link copied to clipboard
fun setColorAlpha(@ColorInt color: Int, @FloatRange(from = 0.0, to = 1.0) alpha: Float): Int

Method to get transparency from provided color

Link copied to clipboard
Link copied to clipboard
fun CheckBox.tint(@ColorInt color: Int)
fun EditText.tint(@ColorInt color: Int)
fun SeekBar.tint(@ColorInt color: Int)
fun ProgressBar.tint(@ColorInt color: Int, skipIndeterminate: Boolean = false)
fun Toolbar.tint(@ColorInt color: Int, tintTitle: Boolean = true)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Int.toHexString(withAlpha: Boolean = false, withHexPrefix: Boolean = true): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Int.withAlpha(@IntRange(from = 0, to = 255) alpha: Int): Int
Link copied to clipboard
fun Int.withMinAlpha(@IntRange(from = 0, to = 255) alpha: Int): Int