Skip to content

Main content

Css Unicode Range Single Interval Tool

Compute css unicode range single interval from explicit bounded inputs.

Loading tool…

Description

Return inclusive start and end, requiring start<=end<=U+10FFFF.

CSS token notation separates numeric values, units, Unicode ranges, and color channels. Code-point intervals differ from Unicode scalar validity, while RGB channel bytes and alpha use different scales. A token decoder can return components without parsing a stylesheet or checking all CSS semantics.

Return inclusive start and end, requiring start<=end<=U+10FFFF.

When to use this tool

Use Css Unicode Range Single Interval when you need the components of the supported CSS color, range, or dimension token.

How to use the tool and how it works

  1. Enter token. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read start, end. Use the output convention below.

Accept a case-insensitive U+ prefix with 1-6 hex digits and an optional hyphenated second value. Return inclusive start and end, requiring start<=end<=U+10FFFF.1

Input fieldMeaning and unitsAccepted input
tokenComplete literal token in the grammar stated above.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
startInclusive numeric range start; no surrogate exclusion is applied.Required. Safe integer.
endEndRequired. Safe integer.
json
{
  "input": {
    "token": "U+0041-005A"
  },
  "output": {
    "start": 65,
    "end": 90
  }
}

Limitations and assumptions

  • Surrogate numeric values are not excluded. Wildcards and surrounding CSS syntax are unsupported; parsing a range does not establish Unicode scalar validity, assigned characters, or font support.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use a CSS parser for escapes, identifiers, token boundaries, and complete stylesheet grammar. Apply appropriate color or Unicode interpretation only after checking the intended value model.

References

  1. Calculation and input contract: parse/css-unicode-range-single-interval — tool.io

Similar or alternative tools