OVH Cloud OVH Cloud

[MacOS X] cherche pipette couleur avec code HTML

31 réponses
Avatar
pere.noel
je cherche une pipette couleur avec code HTML

je ne me souviens + du nom de cet "add-on" qui modifiait la fenêtre
couleur de MacOS X.
--
une bévue

10 réponses

1 2 3 4
Avatar
pere.noel
ric zito wrote:


- vous pouvez créer un Apple Color Picker autonome, avec un simple
Applescript. Ouvrez Script Editor, et tapez "choose color" (sans
guillemets). Sauvez ça au format Application et voilà, c'est tout!


bon pour ceux que ça intéresserait :
-----------------------------------------------------------------------
on dectohex(decnum)
set decnum to round (((decnum) / 256 + 0.5)) - 1
if decnum is 0 then return "00"

if decnum is less than 0 then
--log "can't handle negative numbers: " & decnum
return "0"
end if

set hexchars to "0123456789ABCDEF"
set hexstring to ""
set x to decnum
set placeval to 1

repeat
if x is 0 then exit repeat

set dx to x div placeval
set mx to dx mod 16
set hexstring to (character (mx + 1) of hexchars) &
hexstring
set x to x - (mx * placeval)
set placeval to (placeval * 16)
end repeat

if decnum is less than 16 then set hexstring to ("0" &
hexstring)
return hexstring
end dectohex

set colorRVB to choose color
repeat with i from 1 to the count of colorRVB
set item i of colorRVB to dectohex(item i of colorRVB)
end repeat

set colorHTML to "#" & (item 1 of colorRVB) & (item 2 of colorRVB) &
(item 3 of colorRVB)
set the clipboard to colorHTML
colorHTML
-----------------------------------------------------------------------

on a donc le résultat colorHTML dans le presse papier...

(je suis loin d'être un as d'AS ;-))
--
une bévue

Avatar
pere.noel
Une bévue wrote:

return "0"


il fallait lire :
return "00"
--
une bévue

Avatar
ASM
Ben moi ça fait un moment que je cherche sans succés
une pipette couleur avec les couleurs Pantone (pour respecter des
chartes graphique dans Keynote nottament...)


Pantome étant une colorithèque déposée et dont les droits d'utilisation
sont loin d'être gratuits ... ça va pas être facile

Et puis ça a l'air d'être pour Windows...
<http://www.pantone.co.uk/ProductDetails02.asp?l=xt&p=ni&ca=3&co=4&pr–>
<http://www.pantone-france.com/ProductDetails02.asp?l=pd&p=as&ca=3&co=4&prY>
ou
<http://www.pantone-france.com/ProductDetails02.asp?%6C=pd&%70=as&%63%61=3&%63%6F=4&%70%72–>

voir si ici :
<http://www.javascriptfr.com/codes/COLOR-PICKER-PHOTOSHOP-PALETTE-PANTONE-RGB-CMYK-HSV_34744.aspx>
?

Mais de toutes façons une pipette qui repérerait une couleur à l'écran
(par définition assez peu réaliste, juste, correcte) ne pourra qu'au
mieux ne donner qu'une approximation. Approximation aggravée au passage
en Pantone.
L'inverse devrait être plus proche de la réalité même si Pantone et RGB
n'ont aucune correspondance mathématique.

voir :
http://www.websters-online-dictionary.org/definition/english/Pa/Pantone.html

--
Stephane Moriaux et son [moins] vieux Mac

Avatar
luc
Une bévue wrote:

bon pour ceux que ça intéresserait :
[snip]


La même chose en 3 lignes:

set rvb to choose color
set AppleScript's text item delimiters to ","
set html to (do shell script "ruby -e 'puts %q{#%02X%02X%02X} % [" &
(rvb as string) & "].map {|e| e / 256}'")

:>

--
Luc Heinrich

Avatar
francois.jacquemin
Luc Heinrich wrote:

La même chose en 3 lignes:


Yeu ? Tu bois quoi comme pinard, toi ? Je veux dire quand tu programmes
en trois lignes ?
--
F. Jacquemin

Avatar
nospam
Luc Heinrich wrote:

set rvb to choose color
set AppleScript's text item delimiters to ","
set html to (do shell script "ruby -e 'puts %q{#%02X%02X%02X} % [" &
(rvb as string) & "].map {|e| e / 256}'")


Oh un troilignes... Encore un effort Luc, tu fais un deuxlignes et on
relance Hebdogiciel ! :-)

--
Jacques

Avatar
ludovic.cynomys
ric zito wrote:

- vous pouvez créer un Apple Color Picker autonome, avec un simple
Applescript. Ouvrez Script Editor, et tapez "choose color" (sans
guillemets). Sauvez ça au format Application et voilà, c'est tout!


ouais, pas mal !
ça va me réconcilier (un peu) avec applescript, ça...
tant que j'utilise Revolution comme front end, bien entendu ;-)

on mouseUp
do "choose color" as applescript
if the result is not empty then put the result else put it
end mouseUp

--
Qu'est-ce qu'on fout là tous, dans ce petit coin d'Univers ?

Avatar
daniel patin

Oh un troilignes... Encore un effort Luc, tu fais un deuxlignes et on
relance Hebdogiciel ! :-)

ça, ça serait une bonne idée !!


--
daniel.patin (et non pas marcel.dugenou)
http://leinad-fr.net le blog
http://www.daniel-patin.net sur mon mac
http://daniel.patin.adsl.free.fr/ quelques photos

Avatar
luc
Jacques Foucry wrote:

Oh un troilignes... Encore un effort Luc, tu fais un deuxlignes et on
relance Hebdogiciel ! :-)


Suffit de demander:

set AppleScript's text item delimiters to ","
set html to (do shell script "ruby -e 'puts %q{#%02X%02X%02X} % [" &
((choose color) as string) & "].map {|e| e / 256}'")

;)

--
Luc Heinrich

Avatar
luc
François Jacquemin wrote:

Yeu ? Tu bois quoi comme pinard, toi ? Je veux dire quand tu programmes
en trois lignes ?


Je ne bois jamais d'alcool, je déteste ça... :)

--
Luc Heinrich

1 2 3 4