Color.FromValues(Single[], Uri) 메서드

정의

지정한 색 채널 값과 색 프로필을 사용하여 새 Color 구조체를 만듭니다.

public:
 static System::Windows::Media::Color FromValues(cli::array <float> ^ values, Uri ^ profileUri);
public static System.Windows.Media.Color FromValues (float[] values, Uri profileUri);
static member FromValues : single[] * Uri -> System.Windows.Media.Color
Public Shared Function FromValues (values As Single(), profileUri As Uri) As Color

매개 변수

values
Single[]

새 색의 색 채널을 지정하는 값의 컬렉션입니다. 이들 값은 profileUri에 매핑됩니다.

profileUri
Uri

새 색에 대한 ICC(International Color Consortium) 또는 이미지 색 관리(ICM) 색 프로필입니다.

반환

Color

지정한 값과 알파 채널 값 1을 가진 Color 구조체입니다.

예제

다음 예제에서는 사용 하는 방법을 보여 줍니다 합니다 FromValues 메서드를를 Color 구조입니다.

private Color FromValuesExample()
{
    // Create a brown color using the FromValues static method.
    Color myValuesColor = new Color();
    float[] colorValues = new float[4];
    colorValues[0] = 0.0f;
    colorValues[1] = 0.5f;
    colorValues[2] = 0.5f;
    colorValues[3] = 0.5f;

    // Uri to sample color profile. This color profile is used to 
    // determine what the colors the colorValues map to.
    Uri myIccUri = new Uri("C:\\sampleColorProfile.icc");

    // The values given by the first parameter are used with the color 
    // profile specified by the second parameter to determine the color.
    myValuesColor = Color.FromValues(colorValues, myIccUri);
    return myValuesColor;
}
Private Function FromValuesExample() As Color
    ' Create a brown color using the FromValues static method.
    Dim myValuesColor As New Color()
    Dim colorValues(3) As Single
    colorValues(0) = 0.0f
    colorValues(1) = 0.5f
    colorValues(2) = 0.5f
    colorValues(3) = 0.5f

    ' Uri to sample color profile. This color profile is used to 
    ' determine what the colors the colorValues map to.
    Dim myIccUri As New Uri("C:\sampleColorProfile.icc")

    ' The values given by the first parameter are used with the color 
    ' profile specified by the second parameter to determine the color.
    myValuesColor = Color.FromValues(colorValues, myIccUri)
    Return myValuesColor
End Function

설명

ICC(International Color Consortium) 또는 ICM(Image Color Management) 색 프로필에는 색 프린터와 같은 특정 응용 프로그램 또는 장치에 대한 색 시스템 프로필이 포함되어 있습니다. 이 프로필은 다시 다른 디바이스의 개별 프로필에 매핑할 수 있는 공용 프로필에 일치 합니다. 이 통해 다른 애플리케이션 및 디바이스를 동일한 또는 다른 컴퓨터 시스템에서 색을 일치 시키는 데 컴퓨터 디바이스 색 시스템입니다.

적용 대상