Coder Social home page Coder Social logo

Color input is inconsistent about pygame HOT 2 CLOSED

pygame avatar pygame commented on May 15, 2024
Color input is inconsistent

from pygame.

Comments (2)

illume avatar illume commented on May 15, 2024

Original comment by Lenard Lindstrom (Bitbucket: llindstrom, GitHub: llindstrom):


This request would take significant refactoring, particularly in pygame.base and pygame.color and pygame.pixelarray. The simplest approach is to add '' and '#' handling to _RGBAFromColorObj. Then anything in Pygame that accepts a color value would also take a string. It would also mean

#!python
pixel_array[...] = 'black'

would be allowed. I recall some objection to that, but if it is not a problem I can tackle this issue.

Lenard

from pygame.

illume avatar illume commented on May 15, 2024

Original comment by René Dudfield (Bitbucket: illume, GitHub: illume):


Marking as an enhancement proposal.

It would be nice to be able to do things like this:

surf.fill('black')
surf.fill('#FFEECCF0')

I've often wanted this feature myself, and others have suggested it before.

This needs some thought, and a lot of testing to see what side effects this could have. Also, we need to decide on scheduling if this is a much wanted feature or not, and how much work it would take to implement/test.

from pygame.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.