• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSColor question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSColor question


  • Subject: Re: NSColor question
  • From: James Housley <email@hidden>
  • Date: Mon, 25 Apr 2005 12:12:53 -0400

Luc Vandal wrote:
Hi,

isn't there a way to create a NSColor object with "real" color values like 0xff00ff or 255,0,255? Why use float and silly 0.5 or 1.0 values? I don't get it!


What makes that real? Just because it has always been done that way? One problem is 255,255,255 only allows you to create 24-bit color values, or less. You can't specify 32-bit colors.


The conversion is very simple (float)x/255.0

Jim

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
 X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
email@hidden      http://www.FreeBSD.org     The Power to Serve
email@hidden  http://www.TheHousleys.net
---------------------------------------------------------------------
Do not meddle in the affairs of dragons, for you are crunchy and taste
    good with ketchup.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSColor question (From: Luc Vandal <email@hidden>)

  • Prev by Date: NSColor question
  • Next by Date: Re: NSColor question
  • Previous by thread: NSColor question
  • Next by thread: Re: NSColor question
  • Index(es):
    • Date
    • Thread