font colours available in OpenOffice

Johnny Rosenberg gurus.knugum at gmail.com
Wed Aug 25 22:36:09 UTC 2010


2010/8/26 Johnny Rosenberg <gurus.knugum at gmail.com>:
> 2010/8/25 NoOp <glgxg at sbcglobal.net>:
>> On 08/25/2010 03:23 AM, Adam Funk wrote:
>>> Some colleagues and I are trying to coordinate Impress presentations,
>>> and we noticed that some of us have more colours than others.  My OO
>>> has 101 font colours; one colleague has at least a dozen more,
>>> including "Ubuntu Red", which we all like and want to use in our
>>> presentations, as well as "Chart 1", "Chart 2", etc.
>>>
>>> We're both using openoffice.org 1:3.2.0-7ubuntu4.1 on Lucid, and I
>>> can't see any relevant differences in the related packages we have
>>> installed.
>>>
>>> I've figured out how to add this particular colour (Tools -> Options
>>> -> Colours, use RGB = 202, 0, 22) manually, but it's bugging me that
>>> my installation is missing things.
>>>
>>>
>>
>> It's most likely that your colleagues may be using different/older color
>> palettes in their OOo user profile. In OOo it's not readily apparent how
>> to load different *.soc files as you need to do this in Draw:
>>
>> <http://wiki.services.openoffice.org/wiki/Documentation/OOo3_User_Guides/Getting_Started/Draw_workspace>
>> [Color Bar]
>>
>> Once you've changed the .soc to another color palette, those colors will
>> be available in other component (Writer, Calc, Impress, Base) as well.
>>
>> If you are in a Writer document & need to change, the easiest way is to
>> add the Draw toolbar (View|Toolbars|Drawing) and then put a small
>> ellipse on the page. Right-click the ellipse & select 'Area|Color' and
>> load/change the *.soc that you need. You can then delete the ellipse.
>> You can copy additional *.soc files (example: scribus.soc) to your user
>> profile so that you do not need to hunt them down in other folders later on:
>>
>> /home/<username>/.openoffice.org/3/user/config
>>
>> Have your colleagues take a look at the *.soc files in the above and see
>> if they match yours. "Ubuntu Red" was (IIRC) was around the
>> Dapper/Feisty timeframe, and is, I think, possibly 'Rosso corsa'
>> (D40000):
>> http://www.perbang.dk/rgb/D40000/
>> (212, 0, 0)
>> An easy RGB to hex converter is here:
>> http://www.string-functions.com/rgb-hex.aspx
>
> And here's another one:
> Add these functions to My Macros:
>
> REM  *****  BASIC  *****
>
> Option Explicit
>
> Function RGBToHEX(R As Integer, G As Integer, B As Integer) As String
>        RGBToHEX=Hex(R) & Hex(G) & Hex(B)
> End Function
>
> Function HEXToRGB(H As String) As String
>        Dim i As Integer
>        Dim RGB As String
>        For i=0 To 2
>                RGB=RGB & Str(CInt("&H" & Mid(H,2*i+1,2)))
>        Next i
>        HEXToRGB=Trim(RGB)
> End Function
>
>
> Now you can easily convert directly in Calc, for example:
> =HEXTORGB(A4)
>
> If A4 contains abcdef, then the result is:
> 171 205 239
>
> =RGBTOHEX(A5;A6;A7)
> If A5=171, A6=205 and A7=239, then ABCDEF will be returned.
>
> Enjoy…
>
> Be aware though, that I didn't include any kind of error handling, so
> bad input gives bad output, maybe unexpected some times, I'd guess.
>
>
> Regards
>
> Johnny Rosenberg
>

Yes, even if the input is correct it sometimes goes terribly wrong… ha ha ha…

Here's a more correct version, sorry for the crap above:

REM  *****  BASIC  *****

Option Explicit

Function RGBToHEX(R As Integer, G As Integer, B As Integer) As String
	RGBToHEX=Right("0" & Hex(R),2) & Right("0" & Hex(G),2) & Right("0" & Hex(B),2)
End Function

Function HEXToRGB(H As String) As String
	Dim i As Integer
	Dim RGB As String
	For i=0 To 2
		RGB=RGB & (Str(CInt("&H" & Mid(H,2*i+1,2))))
	Next i
	HEXToRGB=Trim(RGB)
End Function

Not perfect, but seems to work with relevant inputs.



Regards

Johnny Rosenberg


>>
>> ============
>> Interesting OT note: Canonical/Ubuntu have changed to an Orange theme &
>> I can't find the old logo documents. These offer some guidance:
>> http://design.canonical.com/the-toolkit/ubuntu-brand-guidelines/
>> http://design.canonical.com/the-toolkit/guides-for-websites/
>> The "interesting" part is that the PDF's were created with Adobe
>> InDesign CS4 (6.0.5) - Acrobat Distiller 8.2.2 (Macintosh) - and the
>> larger pdf documents don't even contain TOC or indexes...
>> Seems a shame that Canonical/Ubuntu can't even use their own OS/system
>> and tools (OOo) to produce these public facing documents.
>>
>>
>>
>>
>>
>>
>>
>> --
>> ubuntu-users mailing list
>> ubuntu-users at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>
>




More information about the ubuntu-users mailing list