CONTROL formula black/white = 21.00 (expect 21.00); white/white = 1.00 (expect 1.00) TEST A: colour on white and on black, script vs live tool (2 decimals) name hex script_white tool_white script_black tool_black match coral #FF6F61 2.73 2.73 7.70 7.70 OK orange #F5821F 2.59 2.59 8.10 8.10 OK yellow #FFD600 1.41 1.41 14.87 14.87 OK lime #8BC34A 2.10 2.10 10.00 10.00 OK green #2E9E5B 3.41 3.41 6.16 6.16 OK teal #1BA39C 3.10 3.10 6.77 6.77 OK sky #3FA9F5 2.56 2.56 8.21 8.21 OK blue #2563EB 5.17 5.17 4.06 4.06 OK indigo #4F46E5 6.29 6.29 3.34 3.34 OK purple #8E44AD 5.87 5.87 3.58 3.58 OK pink #E91E63 4.35 4.35 4.83 4.83 OK gray #9CA3AF 2.54 2.54 8.27 8.27 OK control-black #000000 21.00 21.00 1.00 1.00 OK control-white #FFFFFF 1.00 1.00 21.00 21.00 OK A: 28 of 28 readings equal TEST A2: colour on colour (script only, the tool takes one colour) text background ratio AA_normal_4.5 large_or_UI_3 #FFFFFF #2563EB 5.17 pass pass #FFFFFF #1BA39C 3.10 fail pass #FFFFFF #E91E63 4.35 fail pass #0B1F3A #FFD600 11.70 pass pass #0B1F3A #8BC34A 7.87 pass pass #FF6F61 #0B1F3A 6.06 pass pass #3FA9F5 #4F46E5 2.46 fail fail #FFD600 #F5821F 1.84 fail fail TEST B: text colour on white, nearest passing shade CONTROL mix(): script shade hex equals the tool Shades swatch in 108 of 108 cells NOTE: the tool STEP/TINT/CONTRAST table still showed the default teal row (#1A8D8D) for 12 of 12 inputs, so it was not used name hex ratio_white first_pass_1pct(4.5) fixed_hex fixed_ratio tool_first_10pct_pass(script ratio) first_pass_1pct(3.0) hex3 margin_target_5.175_first_pass coral #FF6F61 2.73 24% #C2544A 4.51 30% #B34E44 5.13 5% #F2695C 31% #B04D43 5.26 orange #F5821F 2.59 26% #B56017 4.52 30% #AC5B16 4.93 8% #E1781D 32% #A75815 5.19 yellow #FFD600 1.41 46% #8A7400 4.59 50% #806B00 5.22 32% #AD9200 50% #806B00 5.22 lime #8BC34A 2.10 34% #5C8131 4.53 40% #53752C 5.32 17% #73A23D 40% #53752C 5.32 green #2E9E5B 3.41 15% #27864D 4.56 20% #257E49 5.05 0% #2E9E5B 22% #247B47 5.25 teal #1BA39C 3.10 19% #16847E 4.53 20% #16827D 4.64 0% #1BA39C 26% #147973 5.23 sky #3FA9F5 2.56 27% #2E7BB3 4.56 30% #2C76AC 4.89 8% #3A9BE1 33% #2A71A4 5.25 blue #2563EB 5.17 0% #2563EB 5.17 - 0% #2563EB 1% #2562E9 5.25 indigo #4F46E5 6.29 0% #4F46E5 6.29 - 0% #4F46E5 0% #4F46E5 6.29 purple #8E44AD 5.87 0% #8E44AD 5.87 - 0% #8E44AD 0% #8E44AD 5.87 pink #E91E63 4.35 2% #E41D61 4.52 10% #D21B59 5.20 0% #E91E63 10% #D21B59 5.20 gray #9CA3AF 2.54 27% #727780 4.50 30% #6D727B 4.84 9% #8E949F 33% #696D75 5.19 TEST C CONTROLS (encode crf 30, then phone-size scaling) ctl1 source 21.00 (#000000 | #FFFFFF) ; encoded 21.00 (#000000 | #FFFFFF) ; source-scaled 21.00 (#000000 | #FFFFFF) ; encoded-scaled 21.00 (#000000 | #FFFFFF) (expect ctl1 about 21, ctl2 exactly 1.00) ctl2 source 1.00 (#2563EB | #2563EB) ; encoded 1.00 (#2361EA | #2361EA) ; source-scaled 1.00 (#2563EB | #2563EB) ; encoded-scaled 1.00 (#2361EA | #2361EA) (expect ctl1 about 21, ctl2 exactly 1.00) TEST C: white background, text 96 px in a 1080x1920 frame, crf 30 name hex nominal source encoded source_scaled_390 (core px) encoded_scaled_390 (core px) coral #FF6F61 2.73 2.73 2.77 2.77 (1921) 2.80 (1921) orange #F5821F 2.59 2.59 2.61 2.63 (1931) 2.64 (1931) yellow #FFD600 1.41 1.41 1.44 1.42 (1954) 1.44 (1954) lime #8BC34A 2.10 2.10 2.13 2.13 (1967) 2.15 (1967) green #2E9E5B 3.41 3.41 3.48 3.48 (1921) 3.54 (1921) teal #1BA39C 3.10 3.10 3.15 3.16 (1931) 3.19 (1931) sky #3FA9F5 2.56 2.56 2.58 2.60 (1954) 2.62 (1954) blue #2563EB 5.17 5.17 5.29 5.32 (1967) 5.41 (1967) indigo #4F46E5 6.29 6.29 6.30 6.48 (1921) 6.46 (1921) purple #8E44AD 5.87 5.87 5.99 6.04 (1931) 6.15 (1931) pink #E91E63 4.35 4.35 4.45 4.41 (1954) 4.46 (1954) gray #9CA3AF 2.54 2.54 2.59 2.58 (1962) 2.64 (1962) encode only: deviation from nominal, min 0.2%, max 2.3% scaling only: deviation from nominal, min 0.5%, max 3.1% encode then scaling: deviation from nominal, min 1.7%, max 4.9% TEST C: white background, text 36 px in a 1080x1920 frame, crf 30 name hex nominal source encoded source_scaled_390 (core px) encoded_scaled_390 (core px) coral #FF6F61 2.73 2.73 2.83 2.85 (123) 2.94 (123) orange #F5821F 2.59 2.59 2.65 2.70 (121) 2.72 (121) yellow #FFD600 1.41 1.41 1.44 1.44 (106) 1.45 (106) lime #8BC34A 2.10 2.10 2.13 2.19 (125) 2.21 (125) green #2E9E5B 3.41 3.41 3.53 3.64 (123) 3.73 (123) teal #1BA39C 3.10 3.10 3.17 3.26 (121) 3.30 (121) sky #3FA9F5 2.56 2.56 2.61 2.70 (106) 2.71 (106) blue #2563EB 5.17 5.17 5.37 5.68 (125) 5.82 (125) indigo #4F46E5 6.29 6.29 6.40 6.89 (123) 6.94 (123) purple #8E44AD 5.87 5.87 6.12 6.37 (121) 6.56 (121) pink #E91E63 4.35 4.35 4.63 4.54 (106) 4.62 (106) gray #9CA3AF 2.54 2.54 2.58 2.69 (124) 2.73 (124) encode only: deviation from nominal, min 1.4%, max 6.5% scaling only: deviation from nominal, min 1.7%, max 9.8% encode then scaling: deviation from nominal, min 3.0%, max 12.5% TEST C: black background, text 96 px in a 1080x1920 frame, crf 30 name hex nominal source encoded source_scaled_390 (core px) encoded_scaled_390 (core px) coral #FF6F61 7.70 7.70 7.48 7.78 (1929) 7.65 (1929) orange #F5821F 8.10 8.10 7.89 8.32 (1931) 8.13 (1931) yellow #FFD600 14.87 14.87 14.57 15.22 (1954) 15.00 (1954) lime #8BC34A 10.00 10.00 9.83 10.32 (1967) 10.18 (1967) green #2E9E5B 6.16 6.16 5.98 6.33 (1921) 6.17 (1921) teal #1BA39C 6.77 6.77 6.62 6.95 (1931) 6.82 (1931) sky #3FA9F5 8.21 8.21 8.09 8.45 (1954) 8.37 (1954) blue #2563EB 4.06 4.06 3.94 4.16 (1967) 4.06 (1967) indigo #4F46E5 3.34 3.34 3.30 3.41 (1921) 3.39 (1921) purple #8E44AD 3.58 3.58 3.47 3.66 (1931) 3.56 (1931) pink #E91E63 4.83 4.83 4.71 4.96 (1954) 4.90 (1954) gray #9CA3AF 8.27 8.27 8.07 8.53 (1967) 8.31 (1967) encode only: deviation from nominal, min -3.1%, max -1.2% scaling only: deviation from nominal, min 1.1%, max 3.2% encode then scaling: deviation from nominal, min -0.6%, max 2.0% TEST C: black background, text 36 px in a 1080x1920 frame, crf 30 name hex nominal source encoded source_scaled_390 (core px) encoded_scaled_390 (core px) coral #FF6F61 7.70 7.70 7.35 7.95 (124) 7.83 (124) orange #F5821F 8.10 8.10 7.87 8.62 (121) 8.48 (121) yellow #FFD600 14.87 14.87 14.46 16.08 (106) 15.94 (106) lime #8BC34A 10.00 10.00 9.75 11.10 (125) 10.89 (125) green #2E9E5B 6.16 6.16 5.91 6.69 (123) 6.49 (123) teal #1BA39C 6.77 6.77 6.54 7.29 (121) 7.13 (121) sky #3FA9F5 8.21 8.21 7.98 9.03 (106) 8.87 (106) blue #2563EB 4.06 4.06 3.88 4.41 (125) 4.25 (125) indigo #4F46E5 3.34 3.34 3.24 3.57 (123) 3.50 (123) purple #8E44AD 3.58 3.58 3.41 3.81 (121) 3.63 (121) pink #E91E63 4.83 4.83 4.51 5.27 (106) 5.09 (106) gray #9CA3AF 8.27 8.27 8.12 9.15 (125) 8.99 (125) encode only: deviation from nominal, min -6.7%, max -1.8% scaling only: deviation from nominal, min 3.2%, max 10.9% encode then scaling: deviation from nominal, min 1.4%, max 8.9% TEST C: white background, text 36 px in a 1080x1920 frame, crf 40 name hex nominal source encoded source_scaled_390 (core px) encoded_scaled_390 (core px) coral #FF6F61 2.73 2.73 2.85 2.85 (123) 2.97 (123) orange #F5821F 2.59 2.59 2.57 2.70 (121) 2.67 (121) yellow #FFD600 1.41 1.41 1.37 1.44 (106) 1.39 (106) lime #8BC34A 2.10 2.10 2.10 2.19 (125) 2.22 (125) green #2E9E5B 3.41 3.41 3.49 3.64 (123) 3.67 (123) teal #1BA39C 3.10 3.10 3.13 3.26 (121) 3.28 (121) sky #3FA9F5 2.56 2.56 2.56 2.70 (106) 2.71 (106) blue #2563EB 5.17 5.17 5.37 5.68 (125) 5.88 (125) indigo #4F46E5 6.29 6.29 6.36 6.89 (123) 6.81 (123) purple #8E44AD 5.87 5.87 6.09 6.37 (121) 6.65 (121) pink #E91E63 4.35 4.35 4.77 4.54 (106) 4.67 (106) gray #9CA3AF 2.54 2.54 2.48 2.69 (124) 2.65 (124) encode only: deviation from nominal, min -2.9%, max 9.7% scaling only: deviation from nominal, min 1.7%, max 9.8% encode then scaling: deviation from nominal, min -1.4%, max 13.8% TEST C: black background, text 36 px in a 1080x1920 frame, crf 40 name hex nominal source encoded source_scaled_390 (core px) encoded_scaled_390 (core px) coral #FF6F61 7.70 7.70 6.91 7.95 (124) 7.46 (124) orange #F5821F 8.10 8.10 7.38 8.62 (121) 8.13 (121) yellow #FFD600 14.87 14.87 14.01 16.08 (106) 15.93 (106) lime #8BC34A 10.00 10.00 9.30 11.10 (125) 10.38 (125) green #2E9E5B 6.16 6.16 5.50 6.69 (123) 6.00 (123) teal #1BA39C 6.77 6.77 6.11 7.29 (121) 6.67 (121) sky #3FA9F5 8.21 8.21 7.57 9.03 (106) 8.56 (106) blue #2563EB 4.06 4.06 3.65 4.41 (125) 4.04 (125) indigo #4F46E5 3.34 3.34 3.06 3.57 (123) 3.37 (123) purple #8E44AD 3.58 3.58 3.11 3.81 (121) 3.36 (121) pink #E91E63 4.83 4.83 4.21 5.27 (106) 4.88 (106) gray #9CA3AF 8.27 8.27 7.71 9.15 (125) 8.48 (125) encode only: deviation from nominal, min -13.0%, max -5.8% scaling only: deviation from nominal, min 3.2%, max 10.9% encode then scaling: deviation from nominal, min -6.0%, max 7.1% TEST B2: fixed colours read back from the live tool (text on white) name fixed_hex script tool_white passes_4.5 coral #C2544A 4.51 4.51 yes orange #B56017 4.52 4.52 yes yellow #8A7400 4.59 4.59 yes lime #5C8131 4.53 4.53 yes green #27864D 4.56 4.56 yes teal #16847E 4.53 4.53 yes sky #2E7BB3 4.56 4.56 yes blue #2563EB 5.17 5.17 yes indigo #4F46E5 6.29 6.29 yes purple #8E44AD 5.87 5.87 yes pink #E41D61 4.52 4.52 yes gray #727780 4.50 4.50 yes B2: 12 of 12 fixed colours read 4.5 or more in the tool