Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8702] iOS: UI - webColor aqua, fuchsia, lime and maroon color names not supported

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2012-04-12T11:50:25.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterPaul Dowsett
AssigneeMarshall Culpepper
Created2012-04-12T10:19:01.000+0000
Updated2017-03-09T21:30:26.000+0000

Description

Problem

Web color names aqua, fushia, lime and maroon are not supported, despite them being included in the [HTML color names](http://en.wikipedia.org/wiki/Web_colors#HTML_color_names) standard, and also supposedly-supported according to the [Webcolor.m](https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/Webcolor.m) code.

Test case

Run this code to test each color name in turn, by clicking the window.
// According to the following test case:
// Android does not currently support: brown
// iOS does not currently support: aqua, fuchsia, lime, maroon

// stripped for tableview background color still to be tested

var webcolor = [
	'black', 'gray', 'darkgray', 'lightgray', 'white', 'red', 'green', 'blue', 'cyan', 'yellow',
	'magenta', 'orange', 'purple', 'brown', 'transparent',
	'aqua', 'fuchsia', 'lime', 'maroon', 'pink', 'navy', 'silver', 'olive', 'teal'];

var webcolorPointer = 0;

var win = Ti.UI.createWindow({
	backgroundColor: webcolor[webcolorPointer],
	exitOnClose: true,
	fullscreen: false,
	layout: 'vertical',
	title: 'Webcolor Demo'
});

var label = Ti.UI.createLabel({
	backgroundColor: 'white',
	text: webcolor[webcolorPointer]
});
webcolorPointer++;

win.add(label);

// click window to iterate through color array
win.addEventListener('click', function(e){
	e.source.backgroundColor = webcolor[webcolorPointer];
	label.text = webcolor[webcolorPointer];
	webcolorPointer++;
	if(webcolorPointer === webcolor.length){
		webcolorPointer = 0;
	}
});

win.open();

Comments

  1. Paul Dowsett 2012-04-12

    Duplicate of TIMOB-8678
  2. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source