- 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
ric zito <address@in.sig> 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...
- 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...
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.
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.
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.
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
Une bévue <pere.noel@laponie.com.invalid> 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}'")
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
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
Luc Heinrich <luc@honk-honk.com> 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
Yeu ? Tu bois quoi comme pinard, toi ? Je veux dire quand tu programmes en trois lignes ? -- F. Jacquemin
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
Luc Heinrich <luc@honk-honk.com> 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 ! :-)
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
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 ?
ric zito <address@in.sig> 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 ?
- 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 ?
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
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
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
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
Jacques Foucry <nospam@foucry.net.invalid> 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}'")
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
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
François Jacquemin <francois.jacquemin@free.fr> wrote:
Yeu ? Tu bois quoi comme pinard, toi ? Je veux dire quand tu programmes
en trois lignes ?