Line drawing of a small moon orbiting around a planet with the words FAST next to it
Docs
1.x
  • 2.x
  • 1.x
Home Community GitHub
  • Apps and Experiences
    • Dependency Injection
  • Community
    • Branch Guide
    • Code of Conduct
    • Contributor Guide
    • Issue Management
    • Joining the community
    • Release Planning
    • Writing documentation
  • Components
    • Components QuickStart
  • Design Systems
    • Creating a Component Library
    • Design Tokens
    • The FAST Frame Design System
    • High Contrast in FAST
    • What is a Design System?
  • Design
    • Localization
    • MatchMedia Stylesheets
  • FAST Element
    • Declaring Templates
    • Defining Elements
    • Getting Started with FAST Element
    • Leveraging CSS
    • Next Steps
    • Observables and State
    • Using Directives
    • Working with Shadow DOM
  • Integrations
    • Angular
    • ASP.NET
    • Aurelia
    • Blazor
    • Ember
    • Introduction
    • React
    • Rollup
    • Svelte
    • Vite
    • Vue
    • Webpack
  • Introduction
  • Resources
    • Acknowledgements
    • Browser Support
    • Cheat Sheet
    • FAQ
    • Glossary
    • License
    • Security
    • Why Web Components?
  • Tools
    • Component Explorer
    • Hot Module Reload
    • Visual Studio Code

@microsoft/fast-colors > xyzToRGB

xyzToRGB() function

Converts a ColorXYZ to a ColorRGBA64

Signature:

export declare function xyzToRGB(xyz: ColorXYZ, alpha?: number): ColorRGBA64;

Parameters

Parameter Type Description
xyz ColorXYZ the xyz color to convert
alpha number the alpha value

Returns:

ColorRGBA64

Remarks

Note that the xyz color space is significantly larger than sRGB. As such, this can return colors rgb values greater than 1 or less than 0

Docs
  • FAST Element
Community
  • Discord
Social
  • Blog
  • GitHub
  • Twitter
Legal
  • License
  • Privacy & cookies
  • Terms of use
  • Trademarks
© Microsoft 2025