"Color" (Comparison Method)
Compare two colors based on color distance.
Details
- The "Color" comparison method considers two colors to be equivalent if they do not differ beyond a given tolerance.
- This tolerance is set using the Tolerance option in AssessmentFunction.
- By default, the distance between each value of the answer key and the submitted answer is computed using ColorDistance. The DistanceFunction option can be used to specify any of the settings supported by ColorDistance.
- When multiple values in the answer key are within the tolerance range of an answer, the closest value is selected.
Examples
open allclose allBasic Examples (2)
Create an AssessmentFunction for a color question:
Create a color assessment with multiple correct answers. Note that the "Color" comparison method is automatically chosen:
Specify an answer using RGBColor:
Scope (2)
Options (1)
DistanceFunction (1)
Set the DistanceFunction to compare based on luminance:
Applications (3)
Create a QuestionObject for color selection:
Create a QuestionObject for assessing the selection of a color from an image: