大网数据广告活动
Web 标准与前端开发

`@color-profile` CSS at-rule

· 52CE 我爱测

The **`@color-profile`** CSS at-rule defines and names a color profile which can later be used in the color_value/color function to specify a color.

The @color-profile CSS at-rule defines and names a color profile which can later be used in the color_value/color function to specify a color.

Syntax

@color-profile --swop5c {
  src: url("https://example.org/SWOP2006_Coated5v2.icc");
}

Parameters

  • profile name
    • : Either a <dashed-ident> or the identifier device-cmyk.

Descriptors

  • src
    • : Specifies the URL to retrieve the color-profile information from.
  • rendering-intent
    • : If the color profile contains more than one rendering intent, this descriptor allows one to be selected as the one to use to define how to map the color to smaller gamuts than this profile is defined over.

      If used, it must be one of the following keywords:

      • relative-colorimetric
        • : Media-relative colorimetric is required to leave source colors that fall inside the destination medium gamut unchanged relative to the respective media white points. Source colors that are out of the destination medium gamut are mapped to colors on the gamut boundary using a variety of different methods.
      • absolute-colorimetric
        • : ICC-absolute colorimetric is required to leave source colors that fall inside the destination medium gamut unchanged relative to the adopted white (a perfect reflecting diffuser). Source colors that are out of the destination medium gamut are mapped to colors on the gamut boundary using a variety of different methods.
      • perceptual
        • : This method is often the preferred choice for images, especially when there are substantial differences between the source and destination (such as a screen display image reproduced on a reflection print). It takes the colors of the source image and re-optimizes the appearance for the destination medium using proprietary methods.
      • saturation
        • : This option was created to preserve the relative saturation (chroma) of the original, and to keep solid colors pure. However, it experienced interoperability problems like the perceptual intent.

Formal syntax

Examples

This example demonstrates using offset printing to ISO 12647-2:2004 using the CGATS/SWOP TR005 2007 characterization data on grade 5 paper with an ink limit of 300% Total Area Coverage, and medium gray component replacement (GCR). This example is from the specification.

The src descriptor specifies the URL to retrieve the color-profile information from.

@color-profile --swop5c {
  src: url("https://example.org/SWOP2006_Coated5v2.icc");
}
.header {
  background-color: color(--swop5c 0% 70% 20% 0%);
}

Specifications

Browser compatibility

Currently, no browsers support this feature.

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。