Onyx (formerly, Scodie) is a census-designated place (CDP) in Kern County, California, United States. Onyx is located 3.5 miles (6 km) east-northeast of Weldon, at an elevation of 2795 feet (852 m). The population was 475 at the 2010 census, down from 476 at the 2000 census. According to the United States Census Bureau, the CDP has a total area of 11.5 square miles (30 km2), over 99% of it land. The place was originally called Scodie in honor of William Scodie, who opened a store in 1861. The first post office at Onyx opened in 1889.