Colorspace definitions.
Defined in <SDL3/SDL_pixels.h>
typedef enum SDL_Colorspace
{0,
SDL_COLORSPACE_UNKNOWN =
/* sRGB is a gamma corrected colorspace, and the default colorspace for SDL rendering and 8-bit RGB surfaces */
0x120005a0u, /**< Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 */
SDL_COLORSPACE_SRGB = /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_RGB,
SDL_COLOR_RANGE_FULL,
SDL_COLOR_PRIMARIES_BT709,
SDL_TRANSFER_CHARACTERISTICS_SRGB,
SDL_MATRIX_COEFFICIENTS_IDENTITY,
SDL_CHROMA_LOCATION_NONE), */
/* This is a linear colorspace and the default colorspace for floating point surfaces. On Windows this is the scRGB colorspace, and on Apple platforms this is kCGColorSpaceExtendedLinearSRGB for EDR content */
0x12000500u, /**< Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 */
SDL_COLORSPACE_SRGB_LINEAR = /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_RGB,
SDL_COLOR_RANGE_FULL,
SDL_COLOR_PRIMARIES_BT709,
SDL_TRANSFER_CHARACTERISTICS_LINEAR,
SDL_MATRIX_COEFFICIENTS_IDENTITY,
SDL_CHROMA_LOCATION_NONE), */
/* HDR10 is a non-linear HDR colorspace and the default colorspace for 10-bit surfaces */
0x12002600u, /**< Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 */
SDL_COLORSPACE_HDR10 = /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_RGB,
SDL_COLOR_RANGE_FULL,
SDL_COLOR_PRIMARIES_BT2020,
SDL_TRANSFER_CHARACTERISTICS_PQ,
SDL_MATRIX_COEFFICIENTS_IDENTITY,
SDL_CHROMA_LOCATION_NONE), */
0x220004c6u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 */
SDL_COLORSPACE_JPEG = /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
SDL_COLOR_RANGE_FULL,
SDL_COLOR_PRIMARIES_BT709,
SDL_TRANSFER_CHARACTERISTICS_BT601,
SDL_MATRIX_COEFFICIENTS_BT601,
SDL_CHROMA_LOCATION_NONE), */
0x211018c6u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 */
SDL_COLORSPACE_BT601_LIMITED = /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
SDL_COLOR_RANGE_LIMITED,
SDL_COLOR_PRIMARIES_BT601,
SDL_TRANSFER_CHARACTERISTICS_BT601,
SDL_MATRIX_COEFFICIENTS_BT601,
SDL_CHROMA_LOCATION_LEFT), */
0x221018c6u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 */
SDL_COLORSPACE_BT601_FULL = /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
SDL_COLOR_RANGE_FULL,
SDL_COLOR_PRIMARIES_BT601,
SDL_TRANSFER_CHARACTERISTICS_BT601,
SDL_MATRIX_COEFFICIENTS_BT601,
SDL_CHROMA_LOCATION_LEFT), */
0x21100421u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 */
SDL_COLORSPACE_BT709_LIMITED = /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
SDL_COLOR_RANGE_LIMITED,
SDL_COLOR_PRIMARIES_BT709,
SDL_TRANSFER_CHARACTERISTICS_BT709,
SDL_MATRIX_COEFFICIENTS_BT709,
SDL_CHROMA_LOCATION_LEFT), */
0x22100421u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 */
SDL_COLORSPACE_BT709_FULL = /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
SDL_COLOR_RANGE_FULL,
SDL_COLOR_PRIMARIES_BT709,
SDL_TRANSFER_CHARACTERISTICS_BT709,
SDL_MATRIX_COEFFICIENTS_BT709,
SDL_CHROMA_LOCATION_LEFT), */
0x21102609u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 */
SDL_COLORSPACE_BT2020_LIMITED = /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
SDL_COLOR_RANGE_LIMITED,
SDL_COLOR_PRIMARIES_BT2020,
SDL_TRANSFER_CHARACTERISTICS_PQ,
SDL_MATRIX_COEFFICIENTS_BT2020_NCL,
SDL_CHROMA_LOCATION_LEFT), */
0x22102609u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 */
SDL_COLORSPACE_BT2020_FULL = /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
SDL_COLOR_RANGE_FULL,
SDL_COLOR_PRIMARIES_BT2020,
SDL_TRANSFER_CHARACTERISTICS_PQ,
SDL_MATRIX_COEFFICIENTS_BT2020_NCL,
SDL_CHROMA_LOCATION_LEFT), */
/**< The default colorspace for RGB surfaces if no colorspace is specified */
SDL_COLORSPACE_RGB_DEFAULT = SDL_COLORSPACE_SRGB, /**< The default colorspace for YUV surfaces if no colorspace is specified */
SDL_COLORSPACE_YUV_DEFAULT = SDL_COLORSPACE_JPEG } SDL_Colorspace;
Since similar colorspaces may vary in their details (matrix, transfer function, etc.), this is not an exhaustive list, but rather a representative sample of the kinds of colorspaces supported in SDL.
This enum is available since SDL 3.1.3.