HTML colours question

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

HTML colours question

Post by cormullion »

Here's a stripped-down version of something I'm working on. I want the text in the bottom pane to be white on black, but it's blue on black. Is there an easy fix?

Code: Select all

(load  
  (string (env "NEWLISPDIR") "/guiserver.lsp")
  )

(set 'html-header [text]
<style>
body {
	background-color: #000;
	color: #fff;
}
</style>
[/text]
)

(gs:init)
(gs:frame 'Style 200 200 400 250 "Style")
(gs:panel 'MainPanel)
(gs:set-grid-layout 'MainPanel 3 1)

(gs:text-area 'string-input 'textfield-handler  1)
(gs:text-pane 'plain-output 'gs:no-action 1)
(gs:text-pane 'html-output  'gs:no-action "text/html")
(gs:set-editable 'html-output nil)

(gs:add-to 'MainPanel 'string-input 'plain-output 'html-output)
(gs:add-to 'Style 'MainPanel)

(gs:set-visible 'Style true)

(define (textfield-handler id text)
	(gs:get-text id 'gettextcallback-handler))

(define (gettextcallback-handler id text)
  (and
    text
     (= id "MAIN:string-input")
     (set 'strng (base64-dec text))
     (set 'result (string {<p>} strng {</p>}))
     (gs:set-text 'plain-output result)
     (gs:set-text 'html-output (string html-header result))))

(gs:listen)

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

specify colors using 6 digits (3 pairs of digits rrggbb)

Code: Select all

<style> 
body { 
   background-color: #000000; 
   color: #FFFFFF; 
} 
</style> 
Lutz

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

Thanks again Lutz! I'm glad you never sleep... :-)

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Thanks again Lutz! I'm glad you never sleep... :-)
at the moment I am on Los Angeles time, so its morning for me ;-)

Lutz

Locked