@UnstableApi
class ColorParser


Parser for color expressions found in styling formats, e.g. TTML and CSS.

See also:

Summary

Public functions

java-static @ColorInt Int
parseCssColor(colorExpression: String!)

Parses a CSS color expression.

java-static @ColorInt Int
parseTtmlColor(colorExpression: String!)

Parses a TTML color expression.

Public functions

parseCssColor

java-static fun parseCssColor(colorExpression: String!): @ColorInt Int

Parses a CSS color expression.

Parameters
colorExpression: String!

The color expression.

Returns
@ColorInt Int

The parsed ARGB color.

parseTtmlColor

java-static fun parseTtmlColor(colorExpression: String!): @ColorInt Int

Parses a TTML color expression.

Parameters
colorExpression: String!

The color expression.

Returns
@ColorInt Int

The parsed ARGB color.