Compartilhar via


ColorType.Tint Propriedade

Definição

Tonalidade

Representa o seguinte atributo no esquema: tint

[DocumentFormat.OpenXml.SchemaAttr(0, "tint")]
public DocumentFormat.OpenXml.DoubleValue Tint { get; set; }
public DocumentFormat.OpenXml.DoubleValue Tint { get; set; }
[DocumentFormat.OpenXml.SchemaAttr(0, "tint")]
public DocumentFormat.OpenXml.DoubleValue? Tint { get; set; }
[DocumentFormat.OpenXml.SchemaAttr("tint")]
public DocumentFormat.OpenXml.DoubleValue? Tint { get; set; }
public DocumentFormat.OpenXml.DoubleValue? Tint { get; set; }
member this.Tint : DocumentFormat.OpenXml.DoubleValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr(0, "tint")>]
member this.Tint : DocumentFormat.OpenXml.DoubleValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr("tint")>]
member this.Tint : DocumentFormat.OpenXml.DoubleValue with get, set
Public Property Tint As DoubleValue

Valor da propriedade

Retorna DoubleValue.

Atributos

Comentários

As informações a seguir do ECMA International Standard ECMA-376 podem ser úteis ao trabalhar com essa classe.

Especifica o valor de tonalidade aplicado à cor.

Se tint for fornecido, ele será aplicado ao valor RGB da cor para determinar a cor final aplicada.

O tint valor é armazenado como um duplo de −1.0 .. 1.0, em que −1.0 significa 100% escurecê-lo e 1,0 significa 100% de clarear. Além disso, 0.0 significa nenhuma alteração.

Ao carregar o valor RGB, ele é convertido em HLS, onde os valores HLS são (0.. HLSMAX), onde HLSMAX atualmente é 255.

Aqui estão alguns exemplos de como aplicar tonalidade à cor:

Se (tint < 0)

Lum' = Lum * (1,0 + tonalidade)

Por exemplo: Lum = 200; tint = −0,5; Escurecer 50%

Lum' = 200 * (0,5) => 100

Por exemplo: Lum = 200; tint = −1.0; Escurecer 100% (tornar preto)

Lum' = 200 * (1,0 – 1,0) => 0

Se (tint > 0)

Lum' = Lum * (1,0 − tint) + (HLSMAX – HLSMAX * (1,0 − tint))

Por exemplo: Lum = 100; tint = 0,75; Clarear 75%

Lum' = 100 * (1 – 0,75) + (HLSMAX – HLSMAX * (1 – 0,75))

= 100 * 0,25 + (255 – 255 * 0,25)

= 25 + (255 – 63) = 25 + 192 = 217

Por exemplo: Lum = 100; tint = 1,0; Clarear 100% (tornar branco)

Lum' = 100 * (1 – 1) + (HLSMAX – HLSMAX * (1 – 1))

= 100 * 0 + (255 – 255 * 0)

= 0 + (255 – 0) = 255

Os valores possíveis para esse atributo são definidos pelo tipo de dados do Esquema double XML.

Aplica-se a