Tone down generated UI surfaces

This commit is contained in:
2026-06-20 04:48:27 +09:00
parent b10eb520b9
commit e0b4fed99d
9 changed files with 22 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 KiB

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 KiB

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 KiB

After

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 896 KiB

After

Width:  |  Height:  |  Size: 828 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 821 KiB

After

Width:  |  Height:  |  Size: 724 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 KiB

After

Width:  |  Height:  |  Size: 744 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 KiB

After

Width:  |  Height:  |  Size: 784 KiB

View File

@@ -5035,6 +5035,9 @@ func _check_panel_texture_path(failures: Array[String], path: String, context: S
failures.append("%s should not keep chroma-key green pixels: %s (%d sampled)" % [context, path, green_fringe_samples]) failures.append("%s should not keep chroma-key green pixels: %s (%d sampled)" % [context, path, green_fringe_samples])
if luma_max - luma_min < 0.10: if luma_max - luma_min < 0.10:
failures.append("%s should contain visible material contrast: %s" % [context, path]) failures.append("%s should contain visible material contrast: %s" % [context, path])
var warm_bias := _image_visible_warm_bias(image, 8)
if warm_bias > 0.12:
failures.append("%s should avoid a dominant yellow UI cast: %s (warm bias %.3f)" % [context, path, warm_bias])
func _check_button_texture_path(failures: Array[String], path: String, context: String) -> void: func _check_button_texture_path(failures: Array[String], path: String, context: String) -> void:
@@ -5090,6 +5093,25 @@ func _check_button_texture_path(failures: Array[String], path: String, context:
failures.append("%s should not keep chroma-key green pixels: %s (%d sampled)" % [context, path, green_fringe_samples]) failures.append("%s should not keep chroma-key green pixels: %s (%d sampled)" % [context, path, green_fringe_samples])
if luma_max - luma_min < 0.08: if luma_max - luma_min < 0.08:
failures.append("%s should contain visible material contrast: %s" % [context, path]) failures.append("%s should contain visible material contrast: %s" % [context, path])
var warm_bias := _image_visible_warm_bias(image, 8)
if warm_bias > 0.12:
failures.append("%s should avoid a dominant yellow UI cast: %s (warm bias %.3f)" % [context, path, warm_bias])
func _image_visible_warm_bias(image: Image, sample_step: int) -> float:
var total_bias := 0.0
var visible_samples := 0
var step := maxi(1, sample_step)
for y in range(0, image.get_height(), step):
for x in range(0, image.get_width(), step):
var pixel := image.get_pixel(x, y)
if pixel.a <= 0.05:
continue
total_bias += maxf(0.0, ((pixel.r + pixel.g) * 0.5) - pixel.b)
visible_samples += 1
if visible_samples <= 0:
return 0.0
return total_bias / float(visible_samples)
func _check_tile_marker_texture_path(failures: Array[String], path: String, context: String) -> void: func _check_tile_marker_texture_path(failures: Array[String], path: String, context: String) -> void: