HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1774 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 1774.


Report 1774 Actions


    Problem Report Number 1774
    Submitter's Classification Specification problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0220
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published 1994-01-20 08:00
    Product Standard X Window System Applications Interface
    Certification Program The Open Brand certification program
    Test Suite VSW version 4.1.1
    Test Identification XOPEN/allcnmdclr 2
    Specification Xlib - C Language Binding
    Location in Spec See Problem Text
    Problem Summary PIN4W.00017 Test should not apply to displays with less than 16-bit color representation.
    Problem Text


    The assertion made by this test is that two named colors allocated
    using XAllocNamedColor will result in colors that have distinct rgb
    values for all supported visual classes.

    According to "X Window Systems" by Scheifler & Gettys, XAllocNamedColor
    will "... return the closest color supported by the hardware in RGB
    format ..."

    Given the hardware limitations of 8 planes for TrueColor and
    DirectColor and the lack of color for GrayScale and StaticColor using
    GrayScale, it is understandable that two different RGB values might map
    to the same colors. The colors arrived at depend on the color reduction
    algorithm chosen.

    Although some may argue that the color algorithm chosen is incorrect,
    the X Protocol specification does not specify the reduction
    algorithm to be used, and so any reasonable algorithm should
    be acceptable.

    Color Collision (StaticGrey and GrayScale):

    The algorithm used to convert a RGB color to grey scale is based on the
    YIQ color model (See "Fundamentals of Interactive Computer Graphics" by
    Foley and VanDam). In this model the grey intensity (the Y component of
    the YIQ) is based on the weighted average of the RGB components. The
    formula is:
    Y = 0.03 * R + 0.59 * G + 0.11 * B

    Using this algorithm, it is probable that certain named colors will
    coincidentally map to the same grey intensity value.

    Color Collision (StaticColor and TrueColor):

    TrueColor and StaticColor are implemented in 8 planes with 3 bits for
    red and green and 2 bits for blue. With this configuration, four
    shades of blue can be rendered: 0, 85, 170, 255 (0, 21845, 43690,
    65535). The algorithm used to map colors evenly to this limited range
    uses a cut off of 64, 128, 192. These cut off numbers provide the
    'best' spread of the colors, allowing each displayable color to handle
    a similar range of the specifyable colors.map.

    In the failure case:
    0 0 255 blue (0 0 65535)
    0 0 205 medium blue (0 0 52685)

    "medium blue" has a value of 205 which is above the cut off for the
    third color value, and so the last color value is used. This color
    happens to match "blue".

    As such it is our opinion that this test is not valid for the
    StaticColor and TrueColor visual classes when the number of planes is
    less than 15.
    Test Output
    /tset/XOPEN/allcnmdclr/Test 2 Failed

    Test Description:
    When a colour name in the table is recognised on a call to
    XAllocNamedColor, and a colour name on a different line of
    the table is also recognised on another call to
    XAllocNamedColor using the same display and colormap, then
    distinct values are returned by each call to
    XAllocNamedColor in the red, green and blue components of
    the XColor structures named by the exact_def_return argument
    and screen_def_return arguments.

    Test Strategy:
    For each supported visual:
    Create a colourmap of that type using XCreateColormap.
    For each pair of colour names in the table:
    Obtain the rgb values corresponding to the name using
    XAllocNamedColor.
    Verify that the rgb triples are different.
    Free the allocated colourmap cell using XFreeColors.

    Test Information:
    --- Running test with visual class PseudoColor, depth 8
    --- Testing with supported visual class PseudoColor
    --- Running test with visual class DirectColor, depth 8
    --- Testing with supported visual class DirectColor
    --- Running test with visual class GrayScale, depth 8
    --- Testing with supported visual class GrayScale
    Colour names "light gray" and "pale green" yield the same supported rgb
    values.
    Colour names "dark cyan" and "violet red" yield the same supported rgb
    values.
    Colour names "orange" and "turquoise" yield the same supported rgb
    values.
    Colour names "orange" and "violet" yield the same supported rgb values.
    Colour names "turquoise" and "violet" yield the same supported rgb
    values.
    --- Running test with visual class StaticGray, depth 8
    --- Testing with supported visual class StaticGray
    Colour names "light gray" and "pale green" yield the same supported rgb
    values.
    Colour names "dark cyan" and "violet red" yield the same supported rgb
    values.
    Colour names "orange" and "turquoise" yield the same supported rgb
    values.
    Colour names "orange" and "violet" yield the same supported rgb values.
    Colour names "turquoise" and "violet" yield the same supported rgb
    values.
    --- Running test with visual class StaticColor, depth 8
    --- Testing with supported visual class StaticColor
    Colour names "gray" and "dark gray" yield the same supported rgb values.
    Colour names "blue" and "medium blue" yield the same supported rgb
    values.
    Colour names "dark blue" and "navy blue" yield the same supported rgb
    values.
    Colour names "light green" and "pale green" yield the same supported
    rgb values.
    --- Running test with visual class TrueColor, depth 8
    --- Testing with supported visual class TrueColor
    Colour names "gray" and "dark gray" yield the same supported rgb values.
    Colour names "blue" and "medium blue" yield the same supported rgb
    values.
    Colour names "dark blue" and "navy blue" yield the same supported rgb
    values.
    Colour names "light green" and "pale green" yield the same supported
    rgb values.

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    These tests deal with the X/Open extensions to the base MIT specifications.
    Page 328 of the X/Open X Window Management specification indicates that if any
    of the colours in the classes C, M or V are available, then all of the colours
    in that class and any other classes of lower precedence will also be available
    as distinct colours.

    This request should be forwarded for interpretation to determine whether a
    waiver should be granted either on the grounds of a grey area in the
    specification or a minor system fault. However, since this deficiency
    should not affect the portability of applications, it is recommended that
    a waiver is granted on one of the above grounds.

    Review Type Expert Group Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    The interpretation subgroup agrees that X/Open CAE Specification
    XO/CAE/91/040 or C140, page 328, 12.3, second bullet, does not apply to
    displays with less than 16-bit colour representation. The subgroup
    recommends that a permanent interpretation should be granted to this
    implementation on the grounds that the specification is unclear as to
    the requirements for a display with les than 16-bit colour representation.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Permanent Interpretation (PIN)
    Review Conclusion
    A permanent interpretation is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority