Skip to content

pygame.Color multiplying behaves differently than expected #3684

@Flynni123

Description

@Flynni123

Environment:

Platform:		macOS-26.2-arm64-arm-64bit-Mach-O
System:			Darwin
System Version:		Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:40 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T6000
Processor:		arm	SSE2: No	AVX2: No	NEON: Yes
Architecture:		Bits: 64bit	Linkage: Mach-O
Python:			CPython 3.14.2 (v3.14.2:df793163d58, Dec  5 2025, 12:18:06) [Clang 16.0.0 (clang-1600.0.26.6)]
GIL Enabled:		True
pygame version:		2.5.6
SDL versions:		Linked: 2.32.10	Compiled: 2.32.10
SDL Mixer versions:	Linked: 2.8.1	Compiled: 2.8.1
SDL Font versions:	Linked: 2.24.0	Compiled: 2.24.0
SDL Image versions:	Linked: 2.8.8	Compiled: 2.8.8
Freetype versions:	Linked: 2.13.3	Compiled: 2.13.3
Display Driver:		cocoa
Mixer Driver:		coreaudio

Current behavior:

pygame.Color(255, 0, 255, 255) * pygame.Color(200, 200, 200, 255)
results in
pygame.Color(255, 0, 255, 255)

Expected behavior:

should result in pygame.Color(200, 0, 200, 255)

Screenshots

Current:
Image

Expected:
Image

Test code

If possible add a simple test program that shows the problem described in this report.

import pygame
pygame.init()
c1 = pygame.Color(255, 0, 255, 255)
c2 = pygame.Color(200, 200, 200, 255)
print("Current", c1*c2)

c2 = c2.normalized()
print("Expected", pygame.Color(list(round(a * b) for a, b in zip(c1, c2))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions