Forum

Annotations color

07 January 2016 11:36 #6290
By default, annotations background is black and text is white.
I would like to change the colors but where?
HTML element(<body bgcolor="#E6E6FA">) inside description field does not seem to work
08 January 2016 02:19 #6314
Hi!

Currently these colors are hardcoded in annotation and cannot be changed easily. We'll think about some API but for now alternative solution would be using Element anchor type.
Blend4Web Team
https://twitter.com/AlexKowel
05 February 2016 15:07 #7160
Looks like the "Element ancor type" works only with json/bin output and not with standalone html.
Anyway I found a place from the code to change the font color. However I could not find where to specify link and visited link color. Is it specified by the browser defaults at the moment?
Default dark blue and default dark purple are hardly visible on black background.
05 February 2016 15:35 #7161
I found a way to change link color. No need to modify source code.
This code inside blender changed links to white:
<style> a:link {color:white} </style>
<style> a:visited {color:white} </style>
05 February 2016 17:12 #7166
I found a way to change link color. No need to modify source code.
Nice to hear that you have found a solution.
Development Lead | Twitter
26 March 2016 16:00 #8519

Ответ на сообщение пользователя nils.austa
I found a way to change link color. No need to modify source code.
This code inside blender changed links to white:
<style> a:link {color:white} </style>
<style> a:visited {color:white} </style>

That's cool, how did you apply that code inside of blender? Was it through the logic editor? I'm also quite interested in playing around with annotations.
28 March 2016 21:02 #8542
There is a feature to use text file inside Blender instead Description field:
Here's example:

example.html
example.blend

One more thing. I needed bold text but Chrome did not render it as bold, other browsers did.
Turned out that Chrome renders bold text only when there is an actual bold font available. Other browsers made "artificial" bold from regular font. I spent a lot of time to figure it out.

This linking stuff works with Blend4web 15.09 and is disabled in newer versions. As promised by developers, it will be back in next new version.
30 March 2016 01:14 #8578
Thanks, this is really interesting to see and just what I was looking for! Great to know that hyperlinking is coming in the future too


I tried creating another anchor and adding another different block of </style> to it and it worked nicely, and all within Blender too!! (presumably you can put all kinds of html inside this text block?).

Cheers
30 March 2016 16:05 #8590
Image worked fine, embed and linked.
link

Script(Google Tracking) did not work.
01 April 2016 09:35 #8628
About 16.03: I noticed that the "Title" field (b4w_object_tags.title) of an annotation allows longer data now.
So it allows base64 image in title instead of text.

base64_image_anchor_64px.html

base64_image_anchor_64px.blend
 
Please register or log in to leave a reply.