Ya, we should probably have a `color` function in scribble/base.
Currently you actually have to use `color-property` found in
`scribble/core`.

You could make your own colorize function like so:

```
(define (colorize #:color c . content)
  (elem #:style (style #f (color-property c)
        content))
```

(Code taken from:
http://stackoverflow.com/questions/34888125/change-font-color-in-scribble-html-backend)

>From there, you can just do:

```
@colorize[#:color "red"]{WARNING}
```

Hope that helps.

~Leif Andersen


On Tue, May 24, 2016 at 6:53 PM, Hendrik Boom <hend...@topoi.pooq.com> wrote:
> On Mon, May 23, 2016 at 03:20:53PM -0400, Hendrik Boom wrote:
>> Can someone give me an example of coloured text in scribble?
>
> I've figured out that I need a style connotaining a color-property
> but I still have no idea how to code that style in scribble, nor how to
> apply it to a piece of text in the middle of a paragraph.
>
> Presumably I need to @something{ } to delimit the piece of text, and
> then somehow apply a style to it.
>
> THe obvious @color[red]{foo} doesn't work, because color  isn't defined.
>
> -- hendrik
>
>>
>> -- hendrik
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to