
48 Cal.2d 71 (1957)
CONTRACTOR'S SAFETY ASSOCIATION (a Corporation), Appellant,
v.
CALIFORNIA COMPENSATION INSURANCE COMPANY (a Corporation), Respondent.
L. A. No. 24366. 
Supreme Court of California. In Bank.  
Mar. 1, 1957.
 Simon Miller, Harry E. Ehrlich and Blau, Shaw & Miller for Appellant.
 Betts, Ely & Loomis, Forrest A. Betts, Frank J. Creede and F. V. Lopardo for Respondent.
 Edmund G. Brown, Attorney General, and Harold B. Haas, Deputy Attorney General, as Amici Curiae on behalf of Respondent. *73
 SHENK, J.
 This is an appeal from the judgment of dismissal following an order sustaining the defendant's oral demurrer to the introduction of any evidence on behalf of the plaintiff.
 The plaintiff seeks to recover dividends to which its claims to be entitled upon an agreement made in conjunction with the purchase of a policy of workmen's compensation insurance.
 As finally amended the complaint alleges that the defendant in 1950 circulated a form letter representing that it would pay dividends according to a stated schedule to group insureds carrying workmen's compensation insurance issued by the defendant where the insured's loss-premium ratio was 65 per cent or less and a surplus was available for payment of such dividends. In August, 1950, the defendant insurance company wrote the plaintiff to the effect that its board of directors had authorized an additional 5 per cent dividend to those insureds whose loss-premium ratio was 60 per cent or less provided a surplus was available to pay the dividend. In reply the plaintiff informed the defendant that it accepted the offer to insure the plaintiff according to the terms of the information thus received. On October 11, 1950, the defendant issued to the plaintiff its standard workmen's compensation policy. The plaintiff alleges that it relied upon those representations and that its loss experience was within a range which would entitle it to dividends in the sum of $77,400.74; that the defendant has sufficient surplus to meet the payment of the dividend, that it arbitrarily reduced plaintiff's dividend to $13,959 and that it has paid that amount. The complaint prays that the balance be paid to the plaintiff upon the determination of the existence of reserves sufficient to make the additional payment. The plaintiff contends that before the representations were made the defendant's board of directors by resolution unknown to the plaintiff provided that no dividend would be paid except by resolution of the board and that the board has arbitrarily reduced the amount of plaintiff's dividend because the plaintiff ceased to do business with the defendant in August, 1951. This, the plaintiff contends, was malicious and oppressive conduct on the part of the defendant through its board of directors. Accordingly, the plaintiff seeks an additional $50,000 as punitive damages.
 The above facts are alleged in three counts. The first is an action upon the collateral agreement which the plaintiff *74 contends is a part of the contract of insurance entered into on October 11, 1950. The second is on a common count for money had and received; the third is for punitive damages.
 The Insurance Commissioner as amicus curiae contends that the enforcement of the dividend agreement would violate the minimum rating provisions of the Insurance Code and administrative rulings promulgated under the code. The defendant joins in this contention and asserts that the enforcement of the agreement would violate the antirebate provisions of the Insurance Code.
 Insurance Code, section 751, provides: "An insurer ... shall not offer or pay, directly or indirectly, as an inducement to enter into an insurance contract, any valuable consideration which is not clearly specified, promised or provided for in the policy, or application for the insurance, and any such consideration not appearing in the policy is an unlawful rebate."
 The receipt of a rebate is made a misdemeanor by Insurance Code, section 752. The code does not, however proscribe all rebates. [1] Insurance Code, section 763, permits rebates under certain conditions. Subsection (a) of that section provides for "The return by an insurer issuing policies on a participating plan, of any portion of the premium as a dividend after the expiration of the term covered by such policy." While the return of a part of the premium would otherwise constitute an unlawful rebate, the return of part of the consideration is permitted under section 763. This provision is, however, limited to participating policies the premiums on which have been defined as follows: "... [P]articipating premiums are those in which the profits therefrom are shared by those who have paid the premiums." (Couch, Cycl. of Ins.,  579.) In State Comp. Ins. Fund v. McConnell, 46 Cal.2d 330, 341 [294 P.2d 440], this court said (in reference to Ins. Code,  11738), " 'Participating' refers to the right to share in earnings and does not refer to the price paid for insurance." Where a dividend agreement is not one to share profits the dividend cannot be said to be "participating" within the meaning of section 763.
 [2] The minimum rating law (now Ins. Code,  11730-11742) was enacted in 1915 to eliminate irresponsible premium policies which developed in response to competitive conditions in the insurance field. The purpose of this law was to require a premium rate which would assure adequate reserves to meet claims as they matured. Obviously, the purpose of the law would be frustrated if collateral agreements could effect a *75 reduction of the premium. For this reason agreements affecting the premium were brought within the scope of statutory and administrative regulation.
 At the time of the transaction here involved Insurance Code, section 11736, provided: "An insurer shall not issue, renew or carry beyond next anniversary date any workmen's compensation insurance under a law of this State at premium rates which are less than the rates approved or issued by the commissioner." The minimum rating law, like the antirebate provisions, contains a provision under which refunds may be made. Section 11738 provides: "Nothing in this article shall affect the right of any insurer to issue compensation participating policies. A refund by reason of a participating provision in a compensation policy shall not be made to policy-holders by any insurer except from surplus accumulated from premiums on workmen's compensation policies issued pursuant to laws of this State governing workmen's compensation insurance."
 The Insurance Commissioner, on March 1, 1950, promulgated the "Manual of Rules, Classifications and Basic Rates for Workmen's Compensation Insurance." This manual, which became effective April 1, 1950, contains the following: "III. Policy Forms and Coverage. ... (2) Each policy issued must contain the following provision: 'This policy, including all endorsements or riders hereon, constitutes the entire contract of insurance. No condition, provision, agreement, or understanding not set forth in the policy or in such endorsement or rider shall affect such contract or any rights, duties, or privileges arising therefrom.' "
 [3] In ruling on the demurrer to the introduction of evidence, the trial court had before it the Insurance Code and administrative rules of the Insurance Commission. Although not pleaded, the trial court could take judicial notice of "Public and private official acts of the legislative, executive and judicial departments of this state. ..." (Code Civ. Proc.  1875.) [4] That matters judicially noticed may be considered in construing the pleadings is well settled. (Chavez v. Times Mirror, 185 Cal. 20, 23 [195 P. 666]; French v. Senate of State of California, 146 Cal. 604, 607 [80 P. 1031, 2 Ann.Cas. 756, 69 L.R.A. 556]; Mendez v. Pacific Gas & Elec. Co., 115 Cal.App.2d 192, 195 [251 P.2d 773]; Clark v. City of Pasadena, 102 Cal.App.2d 198, 200 [227 P.2d 306]; Livermore v. Beal, 18 Cal.App.2d 535, 539 [64 P.2d 987]; Fey v. Rossi Imp. Co., 23 Cal.App. 766, 770 [139 P. 908].) *76
 Section 11738, like section 763, subdivision (a), is limited to participating dividends. Moreover section 11738 expressly requires the participating provision to be "in the policy."
 [5] It is apparent from a consideration of sections 751, 752, 763, 11736, and 11738 of the Insurance Code and rule III of the Manual of Rules that the alleged dividend agreement is contrary to law. If the insurance policy which was not pleaded included the agreement and the agreement otherwise conformed to the requirements of the Insurance Code, a different situation would have been presented. There was no request to amend the complaint to include the entire policy.
 [6] The plaintiff contends that, assuming the agreement to be illegal, it is not barred from recovery because it is not in pari delicto with the defendant. McAllister v. Drapeau, 14 Cal.2d 102 [92 P.2d 911, 125 A.L.R. 800], is relied upon. The plaintiff in that case was of a class for whose sole benefit the statute was enacted. Recovery was predicated on the repudiation of an illegal transaction. Here the plaintiff seeks to recover under an illegal agreement. (See Severance v. Knight-Counihan Co., 29 Cal.2d 561, 569 [177 P.2d 4, 172 A.L.R. 1107].)
 Acceptance or receipt of an unlawful rebate is a misdemeanor. (Ins. Code,  752.) Violation of the minimum rating law is also a misdemeanor. (Ins. Code,  11742.) This court said in Severance v. Knight-Counihan Co., 29 Cal.2d 561 (supra), at page 568: "It is settled that a contract must have a lawful object (Civ. Code,  1596, 1598, 1599) and that a contract for an object prohibited by a penal law is void. ... 'The general rule controlling in cases of this character is that where a statute prohibits or attaches a penalty to the doing of an act, the act is void, and this, notwithstanding that the statute does not expressly pronounce it so, and it is immaterial whether the thing forbidden is malum in se or merely malum prohibitum. ... The imposition by statute of a penalty implies a prohibition of the act to which the penalty is attached, and a contract founded upon such act is void.' "
 The relief sought in the second count is the same as that sought in the first count and is subject to the same defense of illegality.
 [7] The third count alleges that the board of directors of the defendant insurance company passed a resolution, unknown to the plaintiff, providing that no dividends would be paid without further resolution by the board; that the defendant concealed the existence of the resolution from the *77 plaintiff because the defendant knew that the plaintiff would not enter into a contract with the defendant if the resolution were known to it. This, the plaintiff alleges, was fraudulent. The third count further alleges that the defendant withheld dividends from the plaintiff because the plaintiff ceased doing business with the defendant; that the defendant was "... actuated by malice against the plaintiff and that as punishment for said malicious and oppressive conduct, plaintiff requests punitive damages in the sum of $50,000." The third count though phrased in the language of fraud is clearly based upon breach of contract. The injury thus complained of is the refusal of the defendant to perform the contract. No compensatory damages are sought because of the alleged fraud. [8] Punitive damages are not recoverable where compensatory damages are not. (Clark v. McClurg, 215 Cal. 279 [4 P.2d 149, 9 P.2d 505, 81 A.L.R. 908].) [9] It is settled that punitive damages may not be awarded "... in an action based on breach of contract even though the defendant's breach was wilful or fraudulent." (Crogan v. Metz, 47 Cal.2d 398, 405 [303 P.2d 1029].)
 Other contentions made by the plaintiff have been considered and are deemed without merit. From what has been said it follows that the plaintiff suffered no compensable damages because of the action of the defendant. The oral demurrer was properly sustained.
 The judgment is affirmed.
 Gibson, C.J., Carter, J., Traynor, J., Schauer, J., Spence, J., and McComb, J., concurred.
